From ce4a32fe52ef09d8f5ff1dd22c001110902b60a2 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kate/AUTHORS | 42 + kate/COPYING.LIB | 482 ++ kate/ChangeLog | 343 + kate/Mainpage.dox | 36 + kate/Makefile.am | 11 + kate/NEWS | 43 + kate/README | 10 + kate/README.testing | 241 + kate/TODO | 66 + kate/data/Makefile.am | 34 + kate/data/abc.xml | 88 + kate/data/actionscript.xml | 334 + kate/data/ada.xml | 194 + kate/data/ahdl.xml | 145 + kate/data/alert.xml | 53 + kate/data/ansic89.xml | 150 + kate/data/apache.xml | 630 ++ kate/data/asm-avr.xml | 208 + kate/data/asm6502.xml | 120 + kate/data/asp.xml | 393 ++ kate/data/awk.xml | 112 + kate/data/bash.xml | 829 +++ kate/data/bibtex.xml | 65 + kate/data/c.xml | 167 + kate/data/cg.xml | 288 + kate/data/cgis.xml | 146 + kate/data/changelog.xml | 29 + kate/data/cisco.xml | 312 + kate/data/clipper.xml | 501 ++ kate/data/cmake.xml | 352 ++ kate/data/coldfusion.xml | 732 +++ kate/data/commonlisp.xml | 1173 ++++ kate/data/component-pascal.xml | 172 + kate/data/cpp.xml | 273 + kate/data/cs.xml | 161 + kate/data/css.xml | 624 ++ kate/data/cue.xml | 74 + kate/data/d.xml | 348 ++ kate/data/debianchangelog.xml | 60 + kate/data/debiancontrol.xml | 61 + kate/data/desktop.xml | 28 + kate/data/diff.xml | 113 + kate/data/doxygen.xml | 447 ++ kate/data/e.xml | 258 + kate/data/eiffel.xml | 125 + kate/data/email.xml | 106 + kate/data/euphoria.xml | 376 ++ kate/data/ferite.xml | 117 + kate/data/fgl-4gl.xml | 363 ++ kate/data/fgl-per.xml | 172 + kate/data/fortran.xml | 569 ++ kate/data/fstab.xml | 96 + kate/data/gdl.xml | 313 + kate/data/generate-php.pl | 56 + kate/data/gettext.xml | 63 + kate/data/glsl.xml | 323 + kate/data/gnuassembler.xml | 282 + kate/data/haskell.xml | 388 ++ kate/data/html.xml | 201 + kate/data/idconsole.xml | 2146 +++++++ kate/data/idl.xml | 116 + kate/data/ilerpg.xml | 725 +++ kate/data/inform.xml | 406 ++ kate/data/ini.xml | 80 + kate/data/java.xml | 3428 ++++++++++ kate/data/javadoc.xml | 107 + kate/data/javascript.xml | 501 ++ kate/data/jsp.xml | 3070 +++++++++ kate/data/katefiletyperc | 34 + kate/data/katepart.desktop | 90 + kate/data/katepartreadonlyui.rc | 98 + kate/data/katepartui.rc | 124 + kate/data/katesyntaxhighlightingrc | 3 + kate/data/kbasic.xml | 97 + kate/data/language.dtd | 468 ++ kate/data/latex.xml | 332 + kate/data/ldif.xml | 305 + kate/data/lex.xml | 144 + kate/data/lilypond.xml | 1095 ++++ kate/data/list-keywords-ldif.awk | 38 + kate/data/list-keywords-ldif.sh | 12 + kate/data/literate-haskell.xml | 386 ++ kate/data/logtalk.xml | 206 + kate/data/lpc.xml | 166 + kate/data/lua.xml | 237 + kate/data/m3u.xml | 48 + kate/data/mab.xml | 30 + kate/data/makefile.xml | 82 + kate/data/mason.xml | 203 + kate/data/matlab.xml | 222 + kate/data/mediawiki.xml | 95 + kate/data/mips.xml | 359 ++ kate/data/modula-2.xml | 188 + kate/data/mup.xml | 865 +++ kate/data/nasm.xml | 1321 ++++ kate/data/objectivec.xml | 128 + kate/data/ocaml.xml | 181 + kate/data/octave.xml | 2219 +++++++ kate/data/pascal.xml | 193 + kate/data/perl.xml | 827 +++ kate/data/php.xml | 6549 ++++++++++++++++++++ kate/data/picsrc.xml | 402 ++ kate/data/pike.xml | 121 + kate/data/postscript.xml | 434 ++ kate/data/povray.xml | 883 +++ kate/data/progress.xml | 1608 +++++ kate/data/prolog.xml | 230 + kate/data/purebasic.xml | 918 +++ kate/data/python.xml | 233 + kate/data/r.xml | 136 + kate/data/rexx.xml | 134 + kate/data/rhtml.xml | 1235 ++++ kate/data/rib.xml | 143 + kate/data/rpmspec.xml | 80 + kate/data/rsiidl.xml | 440 ++ kate/data/ruby.xml | 908 +++ kate/data/sather.xml | 141 + kate/data/scheme.xml | 436 ++ kate/data/sci.xml | 1191 ++++ kate/data/sgml.xml | 46 + kate/data/sieve.xml | 67 + kate/data/sml.xml | 104 + kate/data/spice.xml | 50 + kate/data/sql-mysql.xml | 476 ++ kate/data/sql-postgresql.xml | 797 +++ kate/data/sql.xml | 951 +++ kate/data/stata.xml | 478 ++ kate/data/syntax.template | 28 + kate/data/tcl.xml | 490 ++ kate/data/tibasic.xml | 71 + kate/data/txt2tags.xml | 61 + kate/data/uscript.xml | 186 + kate/data/velocity.xml | 51 + kate/data/verilog.xml | 227 + kate/data/vhdl.xml | 286 + kate/data/vrml.xml | 139 + kate/data/winehq.xml | 36 + kate/data/xharbour.xml | 543 ++ kate/data/xml.xml | 147 + kate/data/xmldebug.xml | 593 ++ kate/data/xslt.xml | 379 ++ kate/data/yacas.xml | 237 + kate/data/yacc.xml | 159 + kate/interfaces/.kateconfig | 1 + kate/interfaces/Makefile.am | 12 + kate/interfaces/document.h | 407 ++ kate/interfaces/interfaces.cpp | 127 + kate/interfaces/katecmd.cpp | 223 + kate/interfaces/katecmd.h | 99 + kate/interfaces/view.h | 303 + kate/part/.kateconfig | 1 + kate/part/Makefile.am | 44 + kate/part/configure.in.in | 89 + kate/part/katearbitraryhighlight.cpp | 162 + kate/part/katearbitraryhighlight.h | 87 + kate/part/kateattribute.cpp | 268 + kate/part/kateattribute.h | 147 + kate/part/kateautoindent.cpp | 2543 ++++++++ kate/part/kateautoindent.h | 581 ++ kate/part/katebookmarks.cpp | 287 + kate/part/katebookmarks.h | 86 + kate/part/katebuffer.cpp | 1660 +++++ kate/part/katebuffer.h | 709 +++ kate/part/katecmds.cpp | 605 ++ kate/part/katecmds.h | 178 + kate/part/katecodecompletion.cpp | 566 ++ kate/part/katecodecompletion.h | 164 + kate/part/katecodefoldinghelpers.cpp | 1662 +++++ kate/part/katecodefoldinghelpers.h | 222 + kate/part/kateconfig.cpp | 1429 +++++ kate/part/kateconfig.h | 537 ++ kate/part/katecursor.cpp | 192 + kate/part/katecursor.h | 250 + kate/part/katedialogs.cpp | 1740 ++++++ kate/part/katedialogs.h | 406 ++ kate/part/katedocument.cpp | 5174 ++++++++++++++++ kate/part/katedocument.h | 1073 ++++ kate/part/katedocumenthelpers.cpp | 56 + kate/part/katedocumenthelpers.h | 71 + kate/part/katefactory.cpp | 276 + kate/part/katefactory.h | 312 + kate/part/katefiletype.cpp | 596 ++ kate/part/katefiletype.h | 142 + kate/part/katefont.cpp | 127 + kate/part/katefont.h | 114 + kate/part/katehighlight.cpp | 3473 +++++++++++ kate/part/katehighlight.h | 438 ++ kate/part/kateindentscriptabstracts.cpp | 49 + kate/part/kateindentscriptabstracts.h | 99 + kate/part/katejscript.cpp | 1169 ++++ kate/part/katejscript.h | 233 + kate/part/katekeyinterceptorfunctor.h | 25 + kate/part/katelinerange.cpp | 75 + kate/part/katelinerange.h | 70 + kate/part/kateluaindentscript.cpp | 528 ++ kate/part/kateluaindentscript.h | 69 + kate/part/kateprinter.cpp | 1005 +++ kate/part/kateprinter.h | 136 + kate/part/katerenderer.cpp | 1032 +++ kate/part/katerenderer.h | 272 + kate/part/kateschema.cpp | 1611 +++++ kate/part/kateschema.h | 323 + kate/part/katesearch.cpp | 1012 +++ kate/part/katesearch.h | 243 + kate/part/katespell.cpp | 221 + kate/part/katespell.h | 86 + kate/part/katesupercursor.cpp | 746 +++ kate/part/katesupercursor.h | 463 ++ kate/part/katesyntaxdocument.cpp | 475 ++ kate/part/katesyntaxdocument.h | 164 + kate/part/katetemplatehandler.cpp | 342 + kate/part/katetemplatehandler.h | 68 + kate/part/katetextline.cpp | 443 ++ kate/part/katetextline.h | 456 ++ kate/part/kateundo.cpp | 392 ++ kate/part/kateundo.h | 141 + kate/part/kateview.cpp | 1920 ++++++ kate/part/kateview.h | 571 ++ kate/part/kateviewhelpers.cpp | 1205 ++++ kate/part/kateviewhelpers.h | 207 + kate/part/kateviewinternal.cpp | 3496 +++++++++++ kate/part/kateviewinternal.h | 397 ++ kate/part/test_regression.cpp | 1344 ++++ kate/part/test_regression.h | 249 + kate/plugins/Makefile.am | 2 + kate/plugins/autobookmarker/Makefile.am | 17 + kate/plugins/autobookmarker/autobookmarker.cpp | 521 ++ kate/plugins/autobookmarker/autobookmarker.h | 137 + .../ktexteditor_autobookmarker.desktop | 135 + .../autobookmarker/ktexteditor_autobookmarkerrc | 18 + kate/plugins/insertfile/Makefile.am | 17 + kate/plugins/insertfile/insertfileplugin.cpp | 185 + kate/plugins/insertfile/insertfileplugin.h | 70 + .../insertfile/ktexteditor_insertfile.desktop | 156 + .../plugins/insertfile/ktexteditor_insertfileui.rc | 9 + kate/plugins/isearch/ISearchPlugin.cpp | 495 ++ kate/plugins/isearch/ISearchPlugin.h | 114 + kate/plugins/isearch/Makefile.am | 18 + kate/plugins/isearch/ktexteditor_isearch.desktop | 153 + kate/plugins/isearch/ktexteditor_isearchui.rc | 14 + kate/plugins/kdatatool/Makefile.am | 19 + kate/plugins/kdatatool/kate_kdatatool.cpp | 246 + kate/plugins/kdatatool/kate_kdatatool.h | 76 + .../kdatatool/ktexteditor_kdatatool.desktop | 169 + kate/plugins/kdatatool/ktexteditor_kdatatoolui.rc | 8 + kate/plugins/wordcompletion/Makefile.am | 17 + kate/plugins/wordcompletion/docwordcompletion.cpp | 554 ++ kate/plugins/wordcompletion/docwordcompletion.h | 133 + kate/plugins/wordcompletion/docwordcompletionui.rc | 16 + .../ktexteditor_docwordcompletion.desktop | 139 + kate/scripts/Makefile.am | 5 + kate/scripts/jstest.desktop | 119 + kate/scripts/jstest.js | 26 + kate/scripts/script-indent-c-char.js | 30 + kate/scripts/script-indent-c-newline.js | 113 + kate/scripts/script-indent-c-test.js | 180 + kate/scripts/script-indent-c1-test.lua | 154 + kate/scripts/sort.js | 18 + kate/scripts/test.js | 16 + kate/scripts/test_selectioniface.js | 26 + kate/tests/ejp1.asm | 285 + kate/tests/highlight.abc | 8 + kate/tests/highlight.ahdl | 43 + kate/tests/highlight.asm-avr | 75 + kate/tests/highlight.asm-nasm | 27 + kate/tests/highlight.asp | 58 + kate/tests/highlight.awk | 28 + kate/tests/highlight.bib | 31 + kate/tests/highlight.cmake | 48 + kate/tests/highlight.css | 49 + kate/tests/highlight.do | 89 + kate/tests/highlight.dox | 227 + kate/tests/highlight.e | 90 + kate/tests/highlight.exu | 97 + kate/tests/highlight.f90 | 181 + kate/tests/highlight.glsl | 62 + kate/tests/highlight.hs | 124 + kate/tests/highlight.jsp | 170 + kate/tests/highlight.lex | 82 + kate/tests/highlight.lhs | 124 + kate/tests/highlight.lisp | 36 + kate/tests/highlight.ly | 114 + kate/tests/highlight.m | 61 + kate/tests/highlight.mup | 103 + kate/tests/highlight.pb | 87 + kate/tests/highlight.php | 23 + kate/tests/highlight.pike | 24 + kate/tests/highlight.pl | 44 + kate/tests/highlight.pov | 76 + kate/tests/highlight.prg | 71 + kate/tests/highlight.rb | 480 ++ kate/tests/highlight.rib | 68 + kate/tests/highlight.scheme | 186 + kate/tests/highlight.sh | 198 + kate/tests/highlight.sp | 32 + kate/tests/highlight.tcl | 50 + kate/tests/highlight.tex | 73 + kate/tests/highlight.wrl | 41 + kate/tests/highlight.xml | 67 + kate/tests/highlight.xsl | 109 + kate/tests/highlight.y | 54 + kate/tests/highlight_lpc.c | 64 + kate/tests/highlight_ocaml.ml | 105 + kate/tests/highlight_octave.m | 74 + kate/tests/test.js | 134 + kate/tests/test.uc | 266 + 306 files changed, 116336 insertions(+) create mode 100644 kate/AUTHORS create mode 100644 kate/COPYING.LIB create mode 100644 kate/ChangeLog create mode 100644 kate/Mainpage.dox create mode 100644 kate/Makefile.am create mode 100644 kate/NEWS create mode 100644 kate/README create mode 100644 kate/README.testing create mode 100644 kate/TODO create mode 100644 kate/data/Makefile.am create mode 100644 kate/data/abc.xml create mode 100644 kate/data/actionscript.xml create mode 100644 kate/data/ada.xml create mode 100644 kate/data/ahdl.xml create mode 100644 kate/data/alert.xml create mode 100644 kate/data/ansic89.xml create mode 100644 kate/data/apache.xml create mode 100644 kate/data/asm-avr.xml create mode 100644 kate/data/asm6502.xml create mode 100644 kate/data/asp.xml create mode 100644 kate/data/awk.xml create mode 100644 kate/data/bash.xml create mode 100644 kate/data/bibtex.xml create mode 100644 kate/data/c.xml create mode 100644 kate/data/cg.xml create mode 100644 kate/data/cgis.xml create mode 100644 kate/data/changelog.xml create mode 100644 kate/data/cisco.xml create mode 100644 kate/data/clipper.xml create mode 100644 kate/data/cmake.xml create mode 100644 kate/data/coldfusion.xml create mode 100644 kate/data/commonlisp.xml create mode 100644 kate/data/component-pascal.xml create mode 100644 kate/data/cpp.xml create mode 100644 kate/data/cs.xml create mode 100644 kate/data/css.xml create mode 100644 kate/data/cue.xml create mode 100644 kate/data/d.xml create mode 100644 kate/data/debianchangelog.xml create mode 100644 kate/data/debiancontrol.xml create mode 100644 kate/data/desktop.xml create mode 100644 kate/data/diff.xml create mode 100644 kate/data/doxygen.xml create mode 100644 kate/data/e.xml create mode 100644 kate/data/eiffel.xml create mode 100644 kate/data/email.xml create mode 100644 kate/data/euphoria.xml create mode 100644 kate/data/ferite.xml create mode 100644 kate/data/fgl-4gl.xml create mode 100644 kate/data/fgl-per.xml create mode 100644 kate/data/fortran.xml create mode 100644 kate/data/fstab.xml create mode 100644 kate/data/gdl.xml create mode 100644 kate/data/generate-php.pl create mode 100644 kate/data/gettext.xml create mode 100644 kate/data/glsl.xml create mode 100644 kate/data/gnuassembler.xml create mode 100644 kate/data/haskell.xml create mode 100644 kate/data/html.xml create mode 100644 kate/data/idconsole.xml create mode 100644 kate/data/idl.xml create mode 100644 kate/data/ilerpg.xml create mode 100644 kate/data/inform.xml create mode 100644 kate/data/ini.xml create mode 100644 kate/data/java.xml create mode 100644 kate/data/javadoc.xml create mode 100644 kate/data/javascript.xml create mode 100644 kate/data/jsp.xml create mode 100644 kate/data/katefiletyperc create mode 100644 kate/data/katepart.desktop create mode 100644 kate/data/katepartreadonlyui.rc create mode 100644 kate/data/katepartui.rc create mode 100644 kate/data/katesyntaxhighlightingrc create mode 100644 kate/data/kbasic.xml create mode 100644 kate/data/language.dtd create mode 100644 kate/data/latex.xml create mode 100644 kate/data/ldif.xml create mode 100644 kate/data/lex.xml create mode 100644 kate/data/lilypond.xml create mode 100644 kate/data/list-keywords-ldif.awk create mode 100644 kate/data/list-keywords-ldif.sh create mode 100644 kate/data/literate-haskell.xml create mode 100644 kate/data/logtalk.xml create mode 100644 kate/data/lpc.xml create mode 100644 kate/data/lua.xml create mode 100644 kate/data/m3u.xml create mode 100644 kate/data/mab.xml create mode 100644 kate/data/makefile.xml create mode 100644 kate/data/mason.xml create mode 100644 kate/data/matlab.xml create mode 100644 kate/data/mediawiki.xml create mode 100644 kate/data/mips.xml create mode 100644 kate/data/modula-2.xml create mode 100644 kate/data/mup.xml create mode 100644 kate/data/nasm.xml create mode 100644 kate/data/objectivec.xml create mode 100644 kate/data/ocaml.xml create mode 100644 kate/data/octave.xml create mode 100644 kate/data/pascal.xml create mode 100644 kate/data/perl.xml create mode 100644 kate/data/php.xml create mode 100644 kate/data/picsrc.xml create mode 100644 kate/data/pike.xml create mode 100644 kate/data/postscript.xml create mode 100644 kate/data/povray.xml create mode 100644 kate/data/progress.xml create mode 100644 kate/data/prolog.xml create mode 100644 kate/data/purebasic.xml create mode 100644 kate/data/python.xml create mode 100644 kate/data/r.xml create mode 100644 kate/data/rexx.xml create mode 100644 kate/data/rhtml.xml create mode 100644 kate/data/rib.xml create mode 100644 kate/data/rpmspec.xml create mode 100644 kate/data/rsiidl.xml create mode 100644 kate/data/ruby.xml create mode 100644 kate/data/sather.xml create mode 100644 kate/data/scheme.xml create mode 100644 kate/data/sci.xml create mode 100644 kate/data/sgml.xml create mode 100644 kate/data/sieve.xml create mode 100644 kate/data/sml.xml create mode 100644 kate/data/spice.xml create mode 100644 kate/data/sql-mysql.xml create mode 100644 kate/data/sql-postgresql.xml create mode 100644 kate/data/sql.xml create mode 100644 kate/data/stata.xml create mode 100644 kate/data/syntax.template create mode 100644 kate/data/tcl.xml create mode 100644 kate/data/tibasic.xml create mode 100644 kate/data/txt2tags.xml create mode 100644 kate/data/uscript.xml create mode 100644 kate/data/velocity.xml create mode 100644 kate/data/verilog.xml create mode 100644 kate/data/vhdl.xml create mode 100644 kate/data/vrml.xml create mode 100644 kate/data/winehq.xml create mode 100644 kate/data/xharbour.xml create mode 100644 kate/data/xml.xml create mode 100644 kate/data/xmldebug.xml create mode 100644 kate/data/xslt.xml create mode 100644 kate/data/yacas.xml create mode 100644 kate/data/yacc.xml create mode 100644 kate/interfaces/.kateconfig create mode 100644 kate/interfaces/Makefile.am create mode 100644 kate/interfaces/document.h create mode 100644 kate/interfaces/interfaces.cpp create mode 100644 kate/interfaces/katecmd.cpp create mode 100644 kate/interfaces/katecmd.h create mode 100644 kate/interfaces/view.h create mode 100644 kate/part/.kateconfig create mode 100644 kate/part/Makefile.am create mode 100644 kate/part/configure.in.in create mode 100644 kate/part/katearbitraryhighlight.cpp create mode 100644 kate/part/katearbitraryhighlight.h create mode 100644 kate/part/kateattribute.cpp create mode 100644 kate/part/kateattribute.h create mode 100644 kate/part/kateautoindent.cpp create mode 100644 kate/part/kateautoindent.h create mode 100644 kate/part/katebookmarks.cpp create mode 100644 kate/part/katebookmarks.h create mode 100644 kate/part/katebuffer.cpp create mode 100644 kate/part/katebuffer.h create mode 100644 kate/part/katecmds.cpp create mode 100644 kate/part/katecmds.h create mode 100644 kate/part/katecodecompletion.cpp create mode 100644 kate/part/katecodecompletion.h create mode 100644 kate/part/katecodefoldinghelpers.cpp create mode 100644 kate/part/katecodefoldinghelpers.h create mode 100644 kate/part/kateconfig.cpp create mode 100644 kate/part/kateconfig.h create mode 100644 kate/part/katecursor.cpp create mode 100644 kate/part/katecursor.h create mode 100644 kate/part/katedialogs.cpp create mode 100644 kate/part/katedialogs.h create mode 100644 kate/part/katedocument.cpp create mode 100644 kate/part/katedocument.h create mode 100644 kate/part/katedocumenthelpers.cpp create mode 100644 kate/part/katedocumenthelpers.h create mode 100644 kate/part/katefactory.cpp create mode 100644 kate/part/katefactory.h create mode 100644 kate/part/katefiletype.cpp create mode 100644 kate/part/katefiletype.h create mode 100644 kate/part/katefont.cpp create mode 100644 kate/part/katefont.h create mode 100644 kate/part/katehighlight.cpp create mode 100644 kate/part/katehighlight.h create mode 100644 kate/part/kateindentscriptabstracts.cpp create mode 100644 kate/part/kateindentscriptabstracts.h create mode 100644 kate/part/katejscript.cpp create mode 100644 kate/part/katejscript.h create mode 100644 kate/part/katekeyinterceptorfunctor.h create mode 100644 kate/part/katelinerange.cpp create mode 100644 kate/part/katelinerange.h create mode 100644 kate/part/kateluaindentscript.cpp create mode 100644 kate/part/kateluaindentscript.h create mode 100644 kate/part/kateprinter.cpp create mode 100644 kate/part/kateprinter.h create mode 100644 kate/part/katerenderer.cpp create mode 100644 kate/part/katerenderer.h create mode 100644 kate/part/kateschema.cpp create mode 100644 kate/part/kateschema.h create mode 100644 kate/part/katesearch.cpp create mode 100644 kate/part/katesearch.h create mode 100644 kate/part/katespell.cpp create mode 100644 kate/part/katespell.h create mode 100644 kate/part/katesupercursor.cpp create mode 100644 kate/part/katesupercursor.h create mode 100644 kate/part/katesyntaxdocument.cpp create mode 100644 kate/part/katesyntaxdocument.h create mode 100644 kate/part/katetemplatehandler.cpp create mode 100644 kate/part/katetemplatehandler.h create mode 100644 kate/part/katetextline.cpp create mode 100644 kate/part/katetextline.h create mode 100644 kate/part/kateundo.cpp create mode 100644 kate/part/kateundo.h create mode 100644 kate/part/kateview.cpp create mode 100644 kate/part/kateview.h create mode 100644 kate/part/kateviewhelpers.cpp create mode 100644 kate/part/kateviewhelpers.h create mode 100644 kate/part/kateviewinternal.cpp create mode 100644 kate/part/kateviewinternal.h create mode 100644 kate/part/test_regression.cpp create mode 100644 kate/part/test_regression.h create mode 100644 kate/plugins/Makefile.am create mode 100644 kate/plugins/autobookmarker/Makefile.am create mode 100644 kate/plugins/autobookmarker/autobookmarker.cpp create mode 100644 kate/plugins/autobookmarker/autobookmarker.h create mode 100644 kate/plugins/autobookmarker/ktexteditor_autobookmarker.desktop create mode 100644 kate/plugins/autobookmarker/ktexteditor_autobookmarkerrc create mode 100644 kate/plugins/insertfile/Makefile.am create mode 100644 kate/plugins/insertfile/insertfileplugin.cpp create mode 100644 kate/plugins/insertfile/insertfileplugin.h create mode 100644 kate/plugins/insertfile/ktexteditor_insertfile.desktop create mode 100644 kate/plugins/insertfile/ktexteditor_insertfileui.rc create mode 100644 kate/plugins/isearch/ISearchPlugin.cpp create mode 100644 kate/plugins/isearch/ISearchPlugin.h create mode 100644 kate/plugins/isearch/Makefile.am create mode 100644 kate/plugins/isearch/ktexteditor_isearch.desktop create mode 100644 kate/plugins/isearch/ktexteditor_isearchui.rc create mode 100644 kate/plugins/kdatatool/Makefile.am create mode 100644 kate/plugins/kdatatool/kate_kdatatool.cpp create mode 100644 kate/plugins/kdatatool/kate_kdatatool.h create mode 100644 kate/plugins/kdatatool/ktexteditor_kdatatool.desktop create mode 100644 kate/plugins/kdatatool/ktexteditor_kdatatoolui.rc create mode 100644 kate/plugins/wordcompletion/Makefile.am create mode 100644 kate/plugins/wordcompletion/docwordcompletion.cpp create mode 100644 kate/plugins/wordcompletion/docwordcompletion.h create mode 100644 kate/plugins/wordcompletion/docwordcompletionui.rc create mode 100644 kate/plugins/wordcompletion/ktexteditor_docwordcompletion.desktop create mode 100644 kate/scripts/Makefile.am create mode 100644 kate/scripts/jstest.desktop create mode 100644 kate/scripts/jstest.js create mode 100644 kate/scripts/script-indent-c-char.js create mode 100644 kate/scripts/script-indent-c-newline.js create mode 100644 kate/scripts/script-indent-c-test.js create mode 100644 kate/scripts/script-indent-c1-test.lua create mode 100644 kate/scripts/sort.js create mode 100644 kate/scripts/test.js create mode 100644 kate/scripts/test_selectioniface.js create mode 100644 kate/tests/ejp1.asm create mode 100644 kate/tests/highlight.abc create mode 100644 kate/tests/highlight.ahdl create mode 100644 kate/tests/highlight.asm-avr create mode 100644 kate/tests/highlight.asm-nasm create mode 100644 kate/tests/highlight.asp create mode 100644 kate/tests/highlight.awk create mode 100644 kate/tests/highlight.bib create mode 100644 kate/tests/highlight.cmake create mode 100644 kate/tests/highlight.css create mode 100644 kate/tests/highlight.do create mode 100644 kate/tests/highlight.dox create mode 100644 kate/tests/highlight.e create mode 100644 kate/tests/highlight.exu create mode 100644 kate/tests/highlight.f90 create mode 100644 kate/tests/highlight.glsl create mode 100644 kate/tests/highlight.hs create mode 100644 kate/tests/highlight.jsp create mode 100644 kate/tests/highlight.lex create mode 100644 kate/tests/highlight.lhs create mode 100644 kate/tests/highlight.lisp create mode 100644 kate/tests/highlight.ly create mode 100644 kate/tests/highlight.m create mode 100644 kate/tests/highlight.mup create mode 100644 kate/tests/highlight.pb create mode 100644 kate/tests/highlight.php create mode 100644 kate/tests/highlight.pike create mode 100644 kate/tests/highlight.pl create mode 100644 kate/tests/highlight.pov create mode 100644 kate/tests/highlight.prg create mode 100644 kate/tests/highlight.rb create mode 100644 kate/tests/highlight.rib create mode 100644 kate/tests/highlight.scheme create mode 100644 kate/tests/highlight.sh create mode 100644 kate/tests/highlight.sp create mode 100644 kate/tests/highlight.tcl create mode 100644 kate/tests/highlight.tex create mode 100644 kate/tests/highlight.wrl create mode 100644 kate/tests/highlight.xml create mode 100644 kate/tests/highlight.xsl create mode 100644 kate/tests/highlight.y create mode 100644 kate/tests/highlight_lpc.c create mode 100644 kate/tests/highlight_ocaml.ml create mode 100644 kate/tests/highlight_octave.m create mode 100644 kate/tests/test.js create mode 100644 kate/tests/test.uc (limited to 'kate') diff --git a/kate/AUTHORS b/kate/AUTHORS new file mode 100644 index 000000000..c12c9810f --- /dev/null +++ b/kate/AUTHORS @@ -0,0 +1,42 @@ + *** Kate Team *** +- Christoph Cullmann + (Maintainer) + +- Joseph Wenninger + (highlight guy + big bug hunter) + +- Anders Lund + (bookmarks, iconborder, ...) + +- Hamish Rodda + (dynamic wrap, view, optimise, etc) + +- Waldo Bastian + (buffer handling) + +- Charles Samuels + (regular expressions) + +- Michael Bartl + (first one who really helped out :) + +- Matt Newell + +- Michael McCallum + +- John Firebaugh + +- Nadeem Hasan + + *** KWrite Team *** +- Jochen Wilhelmy + (original author of kwrite in kde 1.x until kde 2.1) + +- Glen Parker + (undo history, kspell-integration) + +- Michael Koch + (port to KParts) + +- Dominik Haumann + (developer, highlight wizard) diff --git a/kate/COPYING.LIB b/kate/COPYING.LIB new file mode 100644 index 000000000..a96b5730d --- /dev/null +++ b/kate/COPYING.LIB @@ -0,0 +1,482 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor + Boston, MA 02110-1301, USA. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 of the License, or (at your option) any later version. + + 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. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/kate/ChangeLog b/kate/ChangeLog new file mode 100644 index 000000000..21fc54ba5 --- /dev/null +++ b/kate/ChangeLog @@ -0,0 +1,343 @@ +2003-12-24 Christoph Cullmann + * Overview about some fixes done in the last months: + - Hamish Rodda: + - lots of fixes in the area of the + rendering/selection/view department and massive + bughunting + + - Anders Lund: + - bookmarks/printing enhancements + + - Christoph Cullmann: + - bughunting, config classes/dialogs, consolidation of + part -><- app interaction + +2003-08-28 Christoph Cullmann + * color schemes support + * filetype support + * indenters for different languages by jesse + * folding by indentation kind of working, not perfect :/ + +2002-11-05 Christoph Cullmann + * fix the printing crash + loop together with Anders ;) + +2002-09-06 Christoph Cullmann + * commiting a fix from Nicolai Haehnle for the + cursorDown()/cursorUp() behavior + +2002-09-03 Christoph Cullmann + * some minor fixes in the last days (redraw stuff, memset, ...) + +2002-08-27 Christoph Cullmann + * extended the context signed char to a uint ;) + * some folding fixes (hopefully) + * memleak fix + * undo stuff changed a bit, 0 means unlimited like before, show + that now in the dialog and add a comment to ktexteditor + +2002-08-26 Christoph Cullmann + * Fixes for folding, cleanup, move folding tree into the buffer, + add some inliner's + * Fixes for the big memory usage for the attributes in the buffer + by using run length encoding for the attributes if they are + dumped into the bytearray + +2002-06-01 Christian Couder + * Move view stuff from katedocument to kateviewinternal. + +2002-05-20 Christoph Cullmann + * some more references in use ;) + * fixed some undo probs + (mem leak, KateUndo is now only for internal use in KateUndoGroup) + * start of convertion my*** to m_*** and add m_ to any other private stuff + +2002-05-17 Christian Couder + * Move font stuff from katedocument into new katefont.h and + katefont.cpp files, and clean up katedocument font stuff. + +2002-05-14 Christian Couder + * Big clean up in katedocument using new katecursor stuff. + +2002-05-12 Bernd Gehrmann + * Moved browser extension from view to doc, where it belongs + * If servicetype in the browser extension specifies an encoding, + use that instead of user's local encoding + +2002-05-11 Christian Couder + * implement the KTextEditor::Cursor in the KateCursor class + +2002-05-04 Christoph Cullmann + * first KTextEditor::ViewPlugin which works + drop the helloworld plugin, as it is really no good example (bad code, ..) + +2002-05-04 Christian Couder + * fix undo for comment and uncomment + +2002-05-01 Christian Couder + * cleanups related to the uncomment feature in katetextline and katedocument + +2002-01-04 Christoph Cullmann + * the search stuff in the katedocument is rewritten now, should work mostly, + only search for whole words is just a mess :( + +2002-01-03 Christoph Cullmann + * kate app and kwrite app now use the katepart via libloader and link only + to the kateinterfaces (which will soon be splitted into katepartinterfaces + and kateinterfaces + * new framework for the configpages of the katepart accessible through the + interfaces + * KSpell works again ;) my god, what a buggy thingy + +2001-12-01 Christoph Cullmann + * speedup for insert/removeText/Line + * new editStart/editEnd/editAddUndo functions to make the undo/redo + update + after edit function calls easier to understand an use in katedocument.* + +2001-11-30 Joseph Wenninger + * I hopefully fixed the CSS highlighting finally. It used + deprecated syntax and there was a bug in the highlighting code, + for handling weakDeliminiators. Who renamed them, once they where + called weakDelimiters, which I think is the correct pronounciation. + +2001-11-29 Joseph Wenninger + * KWrite/Kate use different font settings for printing and viewing now + * Fixed a small crash in my kdevelop->kate port of the codecompletion interface + +2001-11-26 Christoph Cullmann + * backspace bug fixed + * more cleanups in doc/view + +2001-11-24 Christoph Cullmann + * the docID is now called documentNumber and is in the KTextEditor lib ;) + * new print and mark interfaces ;) + * bugfixes for some stuff in kateview/document.* + * move more of the document stuff from the view to the document + (old kwritedoc/view was very mixed, no real separation, but that should be nearly done) + +2001-11-17 Christoph Cullmann + * new selection code (bit buggy at the moment, but better than the old way + of storing the selection in the attributes + +2001-10-29 Joseph Wenninger + * Highlighting definitions support now #stay and #pop as context values + * Some highlighting definitions ported + +2001-10-27 Christoph Cullmann + * undo/redo works now without errors + * fix many memleaks + some crashs in buffer + hl + * fix ctx management (almost) + +2001-10-27 Joseph Wenninger + * The stacked highlighting shoul almost work now. + Using old description files it will use quite a lot memory, but + they should work. + Problems: + * It's leaking like a sieve on destruction, because the + memarrays aren't deleted correctly yet (They need to be pointers and not + references, otherwise there are out of memory errors in qgarray) + * Highlighting isn't updated completely yet + * I have to do some nasty workaround because the overloaded == + operator in QMemArray crashes, if one or both of the arrays has + a size of 0 (I think this is a bug in QT, but it could be that + this is intended behavior. Who knows ?) + +2001-10-20 Christoph Cullmann + * new undo/redo stuff, should work now already fine (mostly ;) + +2001-10-14 Christoph Cullmann + * new interfaces + * fixed some bugs (or better mistakes) in EditInterface + * fix bugs and even more bugs + +2001-10-14 Christoph Cullmann + * implementing and enhancing the new KTextEditor interfaces + * rewrite the whole internal document/view stuff ;) (hope will be finished + soon with that old crap ! + * reconstruction of whole katelibs + dirs + +2001-10-06 Christoph Cullmann + * myself back again ;) + * now kate is clean (only qt3), no backports ;) + +2001-08-24 christian@kdevelop.org + * reimplement the commenting of selections on some languages + +2001-08-19 christian@kdevelop.org + * added back Sather highlighting support + * improved Eiffel language syntax highlighting support + * added Eiffel language comment directive in eiffel.xml + * added Ada language comment directive in ada.xml + +2001-08-15 christian@kdevelop.org + * committed Eiffel language syntax highlighting support + +2001-08-08 rokrau@yahoo.com + * committed changes to Kate's API necessary for integration of kate as + a kpart into kdevelop + +2001-05-13 Christoph Cullmann + * after some time of learning for my "Abitur" now again some fixes ;): + textlines stuff rewritten, selection fixed + +/- font zoom buttons in the part + +2001-04-27 Christoph Cullmann + * now the pluginconfig pages work ;) + +2001-04-24 Joseph Wenninger + * now and is replaced by + +2001-04-20 Christoph Cullmann + * new configdialog + * enhanced pluginIface to supports configdialogpages + +2001-04-14 Christoph Cullmann + * now kateview has in iconborder too (without real function at the moment) + +2001-04-10 Christoph Cullmann + * bugfixes for drawBuffer stuff, next/prev viewspace, restoreView + +2001-04-08 Christoph Cullmann + * now encoding for files can be selected at settings dialog (not only UTF8, all possible encodings) + * dropped old code -> use Waldo's code ;) + +2001-04-07 Joseph Wenninger + * Activated Waldo Bastian's NEW_CODE + * Ported Highlighting to it + +2001-04-05 Joseph Wenninger + * Highlighting Configuration is now in kate/kwrite settings too + * Made a cleanup of no longer used classes + +2001-04-04 Christoph Cullmann + * sidebar now again restores config + +2001-04-03 Joseph Wenninger + * Cristi Dumitrescu's PHP keyword / type list added + +2001-04-01 Joseph Wenninger + * Added a new widget KateStackTabWidget + Now you can chose between tabbed or an + KOffice Workspace like view for the file sidebar + --> You can change this behavior in the config dialog + * Not implemented: + restore sidebar page on startup + remove page not implemented yet + (will be fixed soon) + * Added a backport of QT3's QRegExp I got from Scott Manson + wit one addtion (see qt3back/README) + hopefully this will give us more flexibility for syntax + highlighting + +2001-03-27 Christoph Cullmann + * console disabled per default + * console only loaded if enabled + +2001-03-28 Joseph Wenninger + * -n in kate.desktop removed, now config settings are used + +2001-03-27 Christoph Cullmann + * interfaces extended (mainly for projectmanager) + * piper moved to plugins/projectmanager/piper + * a piper Makefile.am created + +2001-03-26 Joseph Wenninger + * 2 reimplemented highlighing configs + * 1 experimental highlighting config + * preparations for an highlighting editing dialog + +2001-03-25 Christoph Cullmann + * rewrite of plugin API and manager, now loading/unloading nice + +2001-03-22 Joseph Wenninger + * single / multi instance mode configurable + Cullmann's -n option forces a new instance + Otherwise it uses the configuration from + the settings dialog. At the moment -n is + default start option + +2001-03-21 Christoph Cullmann + * QPopupMenu for filelist + +2001-03-20 Christoph Cullmann + * kate is now a normal KApplication + +2001-03-18 Christoph Cullmann + * big location changes of source files + * KateFactory now in use by hole Kate app + * KatePartView/Doc merged with KateView/Doc (make life more easy) + +2001-03-18 Joseph Wenninger + * openheader plugin opens the corresponding + .h file for .cpp or .c, and vice versa + * Hopefully fixed highlighting dialog for now. + +2001-03-17 Joseph Wenninger + * Syntaxhighlighting is now defined in cpp.xml, c.xml html.xml ... + instead of a global syntax.xml. + (Not ported completely yet) + * Some simple reg expression work (see html.xml) + +2001-03-17 Christoph Cullmann + * moved textfilter stuff to a own plugin "textfilter" + * cleaned up katemainwindow.* + +2001-03-16 Christoph Cullmann + * search dialog comes up with selected text + * backport of some KDevelop KWrite patches ;) + +2001-03-15 Christoph Cullmann + * katepart finished + * new kwrite using katepart + * removed old kwrite and kwritepart ! + * fixed menu and toolbar problems of the new KWrite app + +2001-03-11 Christoph Cullmann + * kwrite stuff merged into kate !!!!! + +2001-03-04 Christoph Cullmann + * mutiple mainwindows + * fileist, sync for all mainwindows, all open docs listed + +2001-03-03 Christoph Cullmann + * session management (Anders Lund) + * removed some debug stuff + +2001-02-26 Joseph Wenninger + * First step for a plugin management dialog page + Soon to come + +2001-02-26 Christoph Cullmann + * Kate is a part of kdebase :) + sourceforge.net CVS won't be used in the future + +2001-02-24 Phlip + * HTML button - select text, hit , and enter the fields + for an SGML tag. Don't enter the < > or closing tag. We put these + around the selected text, and [try to] re-select that text so you can add + another nested tag right away. We are now the first HTML editor + that's actually better than Notepad! Hours of fun. + + * Filter - select text, hit , and enter an OS command. + we pipe the selected text thru that command, such as "sort", and then + replace the selection with the result. Impress your friends. + +2001-02-21 Joseph Wenninger + * Makefile.am's : correction for linking + * katemenuitem.h : Improved menu items added doc-list + * katelistboxitem.h : Improved listboxitem files-list + +2001-02-19 Christoph Cullmann + * kateconsole.* konsole/* : add kateconsole widget + +2001-02-16 Anders Lund + * katemainwindow.cpp :fixing read/write options to use maindockwindow functions. + +2001-02-15 Joseph Wenninger + * kateview.cpp : Tab doesn't jump to next widget anymore, but inserts a tab into the text + * katemainwindow.* : F8 / SHIFT-F8 jumps to next / previous widget diff --git a/kate/Mainpage.dox b/kate/Mainpage.dox new file mode 100644 index 000000000..301d5788b --- /dev/null +++ b/kate/Mainpage.dox @@ -0,0 +1,36 @@ +/** @mainpage Kate Editor Component + +The Kate Editor Component (also called Kate Part) implements the +KTextEditor interfaces. Thus, all Kate Part classes are internal +and never appear in public interfaces. + +If you wish to have a text editor component in your application, +use the KTextEditor interfaces. + +@authors +Christoph Cullmann \
+Joseph Wenninger \
+Anders Lund \
+Hamish Rodda \
+Waldo Bastian \
+Charles Samuels \
+Michael Bartl \
+Matt Newell \
+Michael McCallum \
+John Firebaugh \
+Nadeem Hasan \
+Jochen Wilhelmy \
+Glen Parker \
+Michael Koch \
+Dominik Haumann \ + +@maintainers +Christoph Cullmann \ + +@licenses +@lgpl + +*/ +// DOXYGEN_REFERENCES = kdecore kio kdeui kparts interfaces/kdocument interfaces/ktexteditor kjs +// DOXYGEN_SET_PROJECT_NAME = Kate +// vim:ts=4:sw=4:expandtab:filetype=doxygen diff --git a/kate/Makefile.am b/kate/Makefile.am new file mode 100644 index 000000000..180e86dab --- /dev/null +++ b/kate/Makefile.am @@ -0,0 +1,11 @@ +SUBDIRS = interfaces part data scripts plugins +EXTRA_DIST = AUTHORS COPYING.LIB ChangeLog NEWS README TODO + +messages: + $(EXTRACTRC) ./*/*.rc >> rc.cpp + $(EXTRACTATTR) --attr=language,name,Language --attr="language,section,Language Section" data/*.xml >> rc.cpp + $(XGETTEXT) `find . -name "*.cpp"` part/*.h -o $(podir)/katepart.pot + +DOXYGEN_REFERENCES = kdecore dcop kio kdeui kparts +include ../admin/Doxyfile.am + diff --git a/kate/NEWS b/kate/NEWS new file mode 100644 index 000000000..df01fb9a3 --- /dev/null +++ b/kate/NEWS @@ -0,0 +1,43 @@ +2005-05-05 + SVN conversion over, thx to coolo and co ;) + +2003-12-24 + XMas ;) + +2003-08-28 + KDE 3.2 feature freeze is close, last big stuff included like + the folding for indentation based languages and the new indenters + by jesse and the color schemes + file type settings, folding for pythong + still needs work + +2002-11-11 + KDE 3.1 is close, printing + dynamic word wrap seems to work fine ;P + +2002-08-26 + Hacking at the KDE e.V. meeting ;) + +2002-03-28 + The code folding Branch is readded back into HEAD + +2002-01-10 + Kate Part is now in Kdelibs ;) + +Old news of kate part/app in kdebase: + +2002-01-03 + Kate App and Part separated + +2001-11-24 + KTextEditor interfaces are near completion ;) + +2001-06-11 + Little Cullmann got his little Abitur with 1.zero ;) + +2001-05-12 + juhu, my abi is over ;) (just must type a news item ;) + +2001-04-01 + Kant -> Kate + +2001-03-01 + Kant is now official part of KDEBASE ;-) diff --git a/kate/README b/kate/README new file mode 100644 index 000000000..5b6281567 --- /dev/null +++ b/kate/README @@ -0,0 +1,10 @@ + *** Kate Part *** +The Kate Part supports the majority of KTextEditor interfaces and it is +highly approciated to use them (the Kate::View/Document interfaces allow are more +tight integration with the kate part, but makes you more depend on the kate part!) + +Homepage: http://kate.kde.org + +Licensing: +The Kate Part and its interfaces are licensed under the LGPL version 2, +not any later version. diff --git a/kate/README.testing b/kate/README.testing new file mode 100644 index 000000000..037271027 --- /dev/null +++ b/kate/README.testing @@ -0,0 +1,241 @@ + Testing Kate +============== + +Author: Leo Savernik + +Kate contains regression tests to ensure that fixed bugs do not reappear in +newer versions. To facilitate regression testing, a dedicated application +testkateregression will execute the regression tests and compare them to the +expecting results, indicating passed as well as failed testcases. + + +1. Using testkateregression + -------------------------- + +We tried to make regression testing for Kate as easy as possible such that you +can run it before each commit and find out regressions caused by your changes +before they are shipped as part of a release. + +Running all regression tests works by simply invoking + + > make check + +in your kate build directory. While executing, testkateregression prints a line +for each executed testcase, prefixed with "PASS" if it passed, and "FAIL" if it +failed. Furthermore, testkateregression stores a comprehensive output log under +/output/index.html. The output log is invaluable for +determining why a certain testcase failed. + +If you invoke testkateregression the first time, it will print instructions on +how to fetch the testsuite and pointing testkateregression to it. This setup +has only to be done once per branch. + + +2. Discriminating your regressions against existing regressions + -------------------------------------------------------------- + +In an ideal universe, all testcases always pass. In this universe, however, +some testcases fail, be it because of anticipating future features not +implemented yet, be it because of nasty bugs which cannot be repaired easily. + +This means if you've hacked on kate for quite some while and then fire up +"make check", you are likely to see many failed tests pass by, most of them +*not* caused by your very changes, as they failed already before. + +To discriminate the failed tests caused by your changes against the unaffected +failures, testkateregression provides the option --save-failures=, which +runs the regression tests and stores all failures under a failure snapshot +identified by . + +The next time you run "make check", testkateregression automatically picks up +the most recently stored failure snapshot and compares the failures and passes +with the one stored in the snapshot. Each failure not listed in the failure +snapshot will be prefixed with "FAIL (new)", indicating that this is a new +failure. Testcases which failed in the snapshot but do pass now are prefixed +with "PASS (new)", indicating that this testcase seems to be fixed now. + + +3. Using testkateregression efficiently + -------------------------------------- + +Therefore, to get the most out of regression testing, we suggest the following +development approach: + + 1. Before you change Kate, update and run testkateregression in the part- + subdirectory. + + > make testkateregression && ./testkateregression --save-failures=last + + This will produce a failure snapshot called "last". + + 2. Hack on Kate. + + 3. Before you commit, run + + > make check + + It will automatically pick up the failure snapshot "last" (provided you + didn't generate a newer one in the meantime) and compare all results with + the previously stored ones. + + If you inspect /output/index.html, the new failures + are marked red. Those are of interest to you, because they have been + caused by your changes. + + New passes are marked green. These were former failures which started + working due to your changes. + + Goto 2 while there are any new failures. + + 4. Commit. + + +4. Invoking testkateregression directly + -------------------------------------- + +While make check is handy and simple enough for the common case, you might +sometimes need more control over regression testing. + +testkateregression features a broad range of options, enabling you to run +dedicated testcases only, specifying an alternate output directory for the +logs, etc. + + > ./testregression --help + +will provide you with a complete list of options. + + +5. Structure of the regression test suite + ---------------------------------------- + +Kate's regression testsuite is located in the KDE repository under + + trunk/tests/katetests/regression + +and consists of two subdirectories + + baseline + tests + +The latter, tests, contains a directory hierarchy for all testcases to be run +by testkateregression. The former, baseline, contains results as they are +expected by correct operation. Mismatch between the output of a test and its +baseline is considered to be a failure. + +Each directory under tests may optionally contain one of the following files. + + .kateconfig + .kateconfig-commands + ignore + KNOWN_FAILURES + +.kateconfig: This file works exactly like .kateconfig as supported by the kate +and kwrite editors. It may contain any kate line variable necessary to set up +the testcases proper. Note that .kateconfig files from parent directories are +not merged with .kateconfig files from child directories. + +.kateconfig-commands: This file may contain all commands that can be entered by +kate's command line (F7). Each line will be interpreted as one command. To the +contrary of .kateconfig, .kateconfig-commands files are merged with +.kateconfig-commands files from parent directories. Nearer ancestors' commands +take precedence over farther ancestors'. + +ignore: This file specifies on each line a file to be ignored in the directory +the ignore-file is located. This enables you to mark any helper files which +otherwise would be interpreted as testcases. Note that hidden files (.*) are +ignored by default, and cannot be "unignored". + +KNOWN_FAILURES: This file specifies on each line a file name of a testcase +which is known to fail. Such known failures are counted towards the total count +of failures but they don't cause testkateregression to return a failure code. + + +6. Structure of a testcase + ------------------------- + +A testcase is comprised of a simple plain text file .txt which may +be located in any subdirectory under tests. This file contains the *initial* +content the testcase operates on. + +Each .txt must be accompanied with a .txt-script which +contains the actual tests to be performed on the testcase. It consists of +simple JavaScript-statements for direct interfacing with Kate. + +Last but not least, a .txt-result exists under the baseline +subdirectory, which contains a mirrored directory hierarchy of tests. This very +file contains the expected *result* of the performed tests. + + +7. Writing a simple testcase + --------------------------- + +Writing your own testcases is easy once you know how to get started. Let's +test how Kate's C-Style indenter fares with indenting after opening braces. + +First, we create the new initial content under tests/indent/csmart/openbrc.txt +and fill it with (the dashed lines are not part of the content) +--------------------------- + +int main() { + +--------------------------- + +Now, we need to write a script performing some actions. We therefore create +a file tests/indent/csmart/openbrc.txt-script and fill it with +--------------------------- +v.setCursorPosition(1,12); +v.enter(); +v.type("good"); +--------------------------- + +Here, we set the initial cursor position to line 2 (the coordinates are zero- +based) and column 13 which happens to be just after the opening brace. Then +v.enter() simulates pressing the return key in the editor, thus inserting a +new line. v.type simulates typing of the word "good" at the current position +of the cursor. + +The options under .kateconfig specify the C-Style indenter to be applied to the +testcases and an indent width of two. With this information, we know what we +expect as a result. + +What we are still missing is the expected result itself which we create under +baseline/indent/csmart/openbrc.txt-result and fill it with +--------------------------- + +int main() { + good + +--------------------------- + +You can see that "good" is indented by two spaces, even though we didn't +specify those with v.type. We expect from the indenter to provide them for us. + +Last but not least we test the testcase by invoking in kate's part directory + + > ./testkateregression indent/csmart/openbrc.txt + +and checking whether it works the way we intended it. + + +7. The JavaScript-interface to the testcases + ------------------------------------------- + +testkateregression provides you with the following global objects for each +testcase: + + v - object of view + d - object of document + +Each object provides the same methods and fields as the respective JavaScript- +interfaces built in to Kate, like v.setCursorPosition. + +Additionally, v provides the following methods unique to testkateregression. + +type() + Inserts into the current cursor position as if had + been typed by the keyboard. Contrary to insert(), it will + trigger indentation and other checks. +enter(), returnKey() + Inserts a new line as if the return key had been pressed. This will + trigger special indentation rules. + diff --git a/kate/TODO b/kate/TODO new file mode 100644 index 000000000..1f50f6b4f --- /dev/null +++ b/kate/TODO @@ -0,0 +1,66 @@ +TODO: + A current todo list is available on: + http://kate.babylon2k.com/index.php/Work_todo + +**** Refactoring/Cleanups **** + +* KateLineRange to become a proper class with methods etc. Parts needed for + bidi. + +* KateViewInternal to be completely hidden from view for almost everything but + the view itself. + + -> in progress, almost done for most parts, viewinternal only visible to friends of KateView + +* Separate more functionality from KateDocument (selections moving to KateView, + a plugin manager class, a config class, etc) + + -> in progress: + * config classes already in place + * selection moved to KateView + +**** new features **** + +* Fix EOL whitespace cleaning finally by removing whitespace at load-time and + keeping the document consistent all the time + + -> DONE ;) whitespaces are no cleaned at load time, the magic clean on save stuff is gone + +* BiDi finally, using Scribe + +* Finally implement arbitrary highlighting and arbitrary input filtering + +* Switch internal highlighting to use arbitrary highlighting api and thus be + exposed (read-only) + +* Buffer locking (Per-line or per-group-of-lines) for multithreaded access + +* More robust history including cursor position history + +* More featureful code completion including syntax highlighted entries + +* Custom widgets in between lines interface (eg. so kcachegrind could use + katepart to display its cpu usage information etc) + +* KateFoldingTree* to use smart cursors + +* Splitting a view over multiple columns (I want to by a 30" apple display ;) + +* Modular input subsystem, to support emulation of other editors in a clean way + +* Improved input modes especially in block selection + +* Multiple selection support + +* Better support for information overlay (eg. documentation of a function - + switch between short / detailed descriptions) + +* Whatever else is needed for multiuser editing (and perhaps put most of it + inside the part, so eg. kate, kdevelop, quanta etc. could all use it) + +* Scripting (we don't have any yet do we?) + + -> in progress, part gets kjs support, already working, but API needs to be + finished and a clever way to let scripts register for the katecmdline needs to + be implemented, with caching and all other cool things the world doesn'T or does + need \ No newline at end of file diff --git a/kate/data/Makefile.am b/kate/data/Makefile.am new file mode 100644 index 000000000..da5febd95 --- /dev/null +++ b/kate/data/Makefile.am @@ -0,0 +1,34 @@ +kde_services_DATA = katepart.desktop + +rckatedir = $(kde_datadir)/katepart +rckate_DATA = katepartui.rc katepartreadonlyui.rc + +syntaxkatedir = $(kde_datadir)/katepart/syntax +syntaxkate_DATA = language.dtd syntax.template cpp.xml c.xml html.xml kbasic.xml objectivec.xml \ + changelog.xml ada.xml css.xml perl.xml php.xml xml.xml java.xml rpmspec.xml \ + sql.xml sql-mysql.xml sql-postgresql.xml vhdl.xml diff.xml bash.xml latex.xml postscript.xml ruby.xml rhtml.xml \ + desktop.xml eiffel.xml pascal.xml sather.xml python.xml makefile.xml \ + ferite.xml scheme.xml matlab.xml tcl.xml ilerpg.xml verilog.xml javascript.xml \ + sml.xml winehq.xml cs.xml sgml.xml idconsole.xml xmldebug.xml fortran.xml haskell.xml \ + literate-haskell.xml r.xml gnuassembler.xml mab.xml mason.xml idl.xml prolog.xml \ + rsiidl.xml coldfusion.xml picsrc.xml uscript.xml lpc.xml velocity.xml sci.xml ldif.xml \ + inform.xml xharbour.xml yacas.xml component-pascal.xml asm6502.xml gdl.xml bibtex.xml d.xml \ + vrml.xml rexx.xml cue.xml progress.xml e.xml sieve.xml modula-2.xml awk.xml cisco.xml \ + doxygen.xml lua.xml pike.xml debianchangelog.xml debiancontrol.xml fgl-4gl.xml fgl-per.xml alert.xml \ + gettext.xml commonlisp.xml clipper.xml povray.xml euphoria.xml mup.xml jsp.xml ocaml.xml lex.xml yacc.xml \ + cg.xml html-php.xml css-php.xml javascript-php.xml ahdl.xml ansic89.xml tibasic.xml \ + purebasic.xml mips.xml logtalk.xml txt2tags.xml xslt.xml stata.xml glsl.xml \ + lilypond.xml abc.xml asp.xml asm-avr.xml rib.xml cmake.xml octave.xml javadoc.xml cgis.xml \ + spice.xml nasm.xml mediawiki.xml apache.xml m3u.xml ini.xml fstab.xml actionscript.xml + +partrcdir = $(kde_confdir) +partrc_DATA = katesyntaxhighlightingrc katefiletyperc + +html-php.xml: $(srcdir)/html.xml $(srcdir)/generate-php.pl + $(PERL) $(srcdir)/generate-php.pl < $(srcdir)/html.xml > $@ + +css-php.xml: $(srcdir)/css.xml $(srcdir)/generate-php.pl + $(PERL) $(srcdir)/generate-php.pl < $(srcdir)/css.xml > $@ + +javascript-php.xml: $(srcdir)/javascript.xml $(srcdir)/generate-php.pl + $(PERL) $(srcdir)/generate-php.pl < $(srcdir)/javascript.xml > $@ diff --git a/kate/data/abc.xml b/kate/data/abc.xml new file mode 100644 index 000000000..8d5ff163b --- /dev/null +++ b/kate/data/abc.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/actionscript.xml b/kate/data/actionscript.xml new file mode 100644 index 000000000..c2656a3e2 --- /dev/null +++ b/kate/data/actionscript.xml @@ -0,0 +1,334 @@ + + + + + + + _accProps + _focusrect + _global + _highquality + _level + _parent + _quality + _root + _soundbuftime + maxscroll + scroll + this + + + + asfunction + call + chr + clearInterval + duplicateMovieClip + escape + eval + fscommand + getProperty + getTimer + getURL + getVersion + gotoAndPlay + gotoAndStop + ifFrameLoaded + int + isFinite + isNaN + length + loadMovie + loadMovieNum + loadVariables + loadVariablesNum + mbchr + mblength + mbord + mbsubstring + nextFrame + nextScene + on + onClipEvent + ord + parseFloat + parseInt + play + prevFrame + prevScene + print + printAsBitmap + printAsBitmapNum + printNum + random + removeMovieClip + setInterval + setProperty + showRedrawRegions + startDrag + stop + stopAllSounds + stopDrag + substring + targetPath + tellTarget + toggleHighQuality + trace + typeof + unescape + unloadMovie + unloadMovieNum + updateAfterEvent + + + + Accessibility + Accordion + Alert + Binding + Button + Camera + CellRenderer + CheckBox + Collection + Color + ComboBox + ComponentMixins + ContextMenu + ContextMenuItem + CustomActions + CustomFormatter + CustomValidator + DataGrid + DataHolder + DataProvider + DataSet + DataType + Date + DateChooser + DateField + Delta + DeltaItem + DeltaPacket + DepthManager + EndPoint + Error + FaultEvent + FocusManager + Form + Function + Iterator + Key + Label + List + LoadVars + Loader + LocalConnection + Log + Math + Media + Menu + MenuBar + Microphone + Mouse + MovieClip + MovieClipLoader + NetConnection + NetStream + Number + NumericStepper + PendingCall + PopUpManager + PrintJob + ProgressBar + RDBMSResolver + RadioButton + RelayResponder + SOAPCall + Screen + ScrollPane + Selection + SharedObject + Slide + Sound + Stage + StyleManager + System + TextArea + TextField + TextFormat + TextInput + TextSnapshot + TransferObject + Tree + TreeDataProvider + TypedValue + UIComponent + UIEventDispatcher + UIObject + Video + WebService + WebServiceConnector + Window + XML + XMLConnector + XUpdateResolver + + + + add + and + break + case + catch + class + continue + default + delete + do + dynamic + else + eq + extends + finally + for + function + ge + get + gt + if + implements + import + in + instanceof + interface + intrinsic + le + lt + ne + new + not + or + private + public + return + set + static + switch + throw + try + var + void + while + with + + + + false + Infinity + -Infinity + NaN + newline + null + true + undefined + + + + Array + Boolean + Number + Object + String + Void + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/ada.xml b/kate/data/ada.xml new file mode 100644 index 000000000..830c5cbd2 --- /dev/null +++ b/kate/data/ada.xml @@ -0,0 +1,194 @@ + + + + + + abort + abs + abstract + accept + access + aliased + all + and + array + at + begin + body + constant + declare + delay + delta + digits + do + else + elsif + end + entry + exception + exit + for + function + generic + goto + in + interface + is + limited + mod + new + not + null + of + or + others + out + overriding + package + pragma + private + procedure + protected + raise + range + rem + record + renames + requeue + return + reverse + separate + subtype + tagged + task + terminate + then + type + until + use + when + while + with + xor + + + all_calls_remote + assert + assertion_policy + asynchronous + atomic + atomic_components + attach_handler + controlled + convention + detect_blocking + discard_names + elaborate + elaborate_all + elaborate_body + export + import + inline + inspection_point + interrupt_handler + interrupt_priority + linker_options + list + locking_policy + no_return + normalize_scalars + optimize + pack + page + partition_elaboration_policy + preelaborable_initialization + preelaborate + priority + priority_specific_dispatching + profile + pure + queuing_policy + relative_deadline + remote_call_interface + remote_types + restrictions + reviewable + shared_passive + storage_size + suppress + task_dispatching_policy + unchecked_union + unsuppress + volatile + volatile_components + + + boolean + char + float + integer + long_float + long_integer + long_long_float + long_long_integer + short_float + short_integer + string + wide_string + wide_char + wide_wide_char + wide_wide_string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/ahdl.xml b/kate/data/ahdl.xml new file mode 100644 index 000000000..cf0ab4652 --- /dev/null +++ b/kate/data/ahdl.xml @@ -0,0 +1,145 @@ + + + + + + assert + bidir + bits + buried + case + clique + connected_pins + constant + defaults + define + design + device + else + elsif + for + function + generate + gnd + help_id + in + include + input + is + machine + node + of + options + others + output + parameters + returns + states + subdesign + then + title + to + tri_state_node + variable + vcc + when + with + + + carry + cascade + dffe + dff + exp + global + jkffe + jkff + latch + lcell + mcell + memory + opendrn + soft + srffe + srff + tffe + tff + tri + wire + x + + + not + and + nand + or + nor + xor + xnor + mod + div + log2 + used + ceil + floor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/alert.xml b/kate/data/alert.xml new file mode 100644 index 000000000..551509662 --- /dev/null +++ b/kate/data/alert.xml @@ -0,0 +1,53 @@ + + + + diff --git a/kate/data/ansic89.xml b/kate/data/ansic89.xml new file mode 100644 index 000000000..2fb3b2d1e --- /dev/null +++ b/kate/data/ansic89.xml @@ -0,0 +1,150 @@ + + + + + + + break + case + continue + default + do + else + enum + extern + for + goto + if + return + sizeof + struct + switch + typedef + union + while + + + auto + char + const + double + float + int + long + register + short + signed + static + unsigned + void + volatile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/apache.xml b/kate/data/apache.xml new file mode 100644 index 000000000..2441f1abf --- /dev/null +++ b/kate/data/apache.xml @@ -0,0 +1,630 @@ + + + + + + + + + +AcceptFilter +AccessFileName +Action +AddAlt +AddAltByEncoding +AddAltByType +AddCharset +AddDefaultCharset +AddDescription +AddEncoding +AddHandler +AddIcon +AddIconByEncoding +AddIconByType +AddInputFilter +AddLanguage +AddModuleInfo +AddOutputFilter +AddOutputFilterByType +AddType +Alias +AliasMatch +Allow +Anonymous +AuthBasicProvider +AuthDBMGroupFile +AuthDBMUserFile +AuthDigestDomain +AuthDigestFile +AuthDigestGroupFile +AuthDigestNonceFormat +AuthDigestProvider +AuthGroupFile +AuthLDAPBindDN +AuthLDAPBindPassword +AuthLDAPCharsetConfig +AuthLDAPGroupAttribute +AuthLDAPUrl +AuthName +AuthUserFile +BrowserMatch +BrowserMatchNoCase +BS2000Account +CacheDisable +CacheEnable +CacheFile +CacheGcClean +CacheGcUnused +CacheRoot +CGIMapExtension +CharsetDefault +CharsetOptions +CharsetSourceEnc +CookieDomain +CookieLog +CookieName +CoreDumpDirectory +CustomLog +Dav +DavGenericLockDB +DavLockDB +DBDParams +DBDPrepareSQL +DBDriver +DefaultIcon +DefaultLanguage +DefaultType +DeflateFilterNote +Deny +DirectoryIndex +DocumentRoot +ErrorDocument +ErrorLog +Example +ExpiresByType +ExpiresDefault +ExtFilterDefine +ExtFilterOptions +FilterChain +FilterDeclare +FilterProtocol +FilterProvider +FilterTrace +ForceType +ForensicLog +Group +Header +HeaderName +ImapBase +Include +IndexIgnore +IndexOptions +IndexStyleSheet +ISAPICacheFile +LanguagePriority +LDAPSharedCacheFile +LDAPTrustedCA +LDAPTrustedCAType +LDAPTrustedClientCert +LDAPTrustedGlobalCert +Listen +LoadFile +LoadModule +LockFile +LogFormat +MetaDir +MetaSuffix +MimeMagicFile +MMapFile +NameVirtualHost +NoProxy +NWSSLTrustedCerts +NWSSLUpgradeable +PassEnv +PidFile +ProxyBlock +ProxyDomain +ProxyPass +ProxyPassReverse +ProxyPassReverseCookieDomain +ProxyPassReverseCookiePath +ProxyRemote +ProxyRemoteMatch +ReadmeName +Redirect +RedirectMatch +RedirectPermanent +RedirectTemp +RemoveCharset +RemoveEncoding +RemoveHandler +RemoveInputFilter +RemoveLanguage +RemoveOutputFilter +RemoveType +RequestHeader +Require +RewriteBase +RewriteCond +RewriteLock +RewriteLog +RewriteMap +RewriteRule +ScoreBoardFile +Script +ScriptAlias +ScriptAliasMatch +ScriptLog +ScriptSock +SecureListen +ServerAdmin +ServerAlias +ServerName +ServerPath +ServerRoot +SetEnv +SetEnvIf +SetEnvIfNoCase +SetHandler +SetInputFilter +SetOutputFilter +SSIEndTag +SSIErrorMsg +SSIStartTag +SSITimeFormat +SSIUndefinedEcho +SSLCACertificateFile +SSLCACertificatePath +SSLCADNRequestFile +SSLCADNRequestPath +SSLCARevocationFile +SSLCARevocationPath +SSLCertificateChainFile +SSLCertificateFile +SSLCertificateKeyFile +SSLCipherSuite +SSLCryptoDevice +SSLHonorCiperOrder +SSLPassPhraseDialog +SSLProxyCACertificateFile +SSLProxyCACertificatePath +SSLProxyCARevocationFile +SSLProxyCARevocationPath +SSLProxyCipherSuite +SSLProxyMachineCertificateFile +SSLProxyMachineCertificatePath +SSLProxyProtocol +SSLRandomSeed +SSLRequire +SSLRequireSSL +SSLUserName +SuexecUserGroup +TransferLog +TypesConfig +UnsetEnv +User +UserDir +VirtualDocumentRoot +VirtualDocumentRootIP +VirtualScriptAlias +VirtualScriptAliasIP +Win32DisableAcceptEx + + + +AllowCONNECT +AssignUserID +AuthDigestNonceLifetime +AuthDigestShmemSize +CacheDefaultExpire +CacheDirLength +CacheDirLevels +CacheForceCompletion +CacheGcDaily +CacheGcInterval +CacheGcMemUsage +CacheLastModifiedFactor +CacheMaxExpire +CacheMaxFileSize +CacheMinFileSize +CacheSize +CacheTimeMargin +ChildPerUserID +CookieExpires +DavMinTimeout +DBDExptime +DBDKeep +DBDMax +DBDMin +DBDPersist +DeflateBufferSize +DeflateCompressionLevel +DeflateMemLevel +DeflateWindowSize +IdentityCheckTimeout +ISAPIReadAheadBuffer +KeepAliveTimeout +LDAPCacheEntries +LDAPCacheTTL +LDAPConnectionTimeout +LDAPOpCacheEntries +LDAPOpCacheTTL +LDAPSharedCacheSize +LimitInternalRecursion +LimitRequestBody +LimitRequestFields +LimitRequestFieldsize +LimitRequestLine +LimitXMLRequestBody +ListenBacklog +MaxClients +MaxKeepAliveRequests +MaxMemFree +MaxRequestsPerChild +MaxRequestsPerThread +MaxSpareServers +MaxSpareThreads +MaxThreads +MaxThreadsPerChild +MCacheMaxObjectCount +MCacheMaxObjectSize +MCacheMaxStreamingBuffer +MCacheMinObjectSize +MCacheSize +MinSpareServers +MinSpareThreads +NumServers +ProxyIOBufferSize +ProxyMaxForwards +ProxyReceiveBufferSize +ProxyTimeout +RewriteLogLevel +RLimitCPU +RLimitMEM +RLimitNPROC +ScriptLogBuffer +ScriptLogLength +SendBufferSize +ServerLimit +SSLProxyVerifyDepth +SSLSessionCacheTimeout +SSLVerifyDepth +StartServers +StartThreads +ThreadLimit +ThreadsPerChild +ThreadStackSize +TimeOut + + + +AcceptMutex +AcceptPathInfo +AllowEncodedSlashes +AllowOverride +Anonymous_Authoritative +Anonymous_LogEmail +Anonymous_MustGiveEmail +Anonymous_NoUserID +Anonymous_VerifyEmail +AuthAuthoritative +AuthBasicAuthoritative +AuthBasicProvider +AuthDBMAuthoritative +AuthDBMType +AuthDefaultAuthoritative +AuthDigestAlgorithm +AuthDigestNcCheck +AuthDigestQop +AuthLDAPAuthoritative +AuthLDAPCompareDNOnServer +AuthLDAPDereferenceAliases +AuthLDAPEnabled +AuthLDAPFrontPageHack +AuthLDAPGroupAttributeIsDN +AuthLDAPRemoteUserIsDN +AuthType +AuthzDBMAuthoritative +AuthzDBMType +AuthzDefaultAuthoritative +AuthzGroupFileAuthoritative +AuthzLDAPAuthoritative +AuthzOwnerAuthoritative +AuthzUserAuthoritative +BufferedLogs +CacheExpiryCheck +CacheIgnoreCacheControl +CacheIgnoreHeaders +CacheIgnoreNoLastMod +CacheNegotiatedDocs +CacheStoreNoStore +CacheStorePrivate +CheckSpelling +ContentDigest +CookieStyle +CookieTracking +CoreDumpDirectory +CustomLog +DavDepthInfinity +DirectorySlash +DumpIOInput +DumpIOOutput +EnableExceptionHook +EnableMMAP +EnableSendfile +ExpiresActive +ExtendedStatus +FileETag +ForceLanguagePriority +HostnameLookups +IdentityCheck +ImapDefault +ImapMenu +IndexOrderDefault +ISAPIAppendLogToErrors +ISAPIAppendLogToQuery +ISAPIFakeAsync +ISAPILogNotSupported +KeepAlive +LDAPTrustedMode +LDAPVerifyServerCert +LogLevel +MCacheRemovalAlgorithm +MetaFiles +ModMimeUsePathInfo +MultiviewsMatch +Options +Order +ProtocolEcho +ProxyBadHeader +ProxyErrorOverride +ProxyPreserveHost +ProxyRequests +ProxyVia +RewriteEngine +RewriteOptions +Satisfy +ScriptInterpreterSource +ServerSignature +ServerTokens +SSLEngine +SSLMutex +SSLOptions +SSLProtocol +SSLProxyEngine +SSLProxyVerify +SSLSessionCache +SSLVerifyClient +UseCanonicalName +XBitHack + + + +On +Off +Default +flock +fcntl +posixsem +pthread +sysvsem +All +None +AuthConfig +FileInfo +Indexes +Limit +Options + +ExecCGI +FollowSymLinks +Includes +IncludesNOEXEC +Indexes +MultiViews +SymLinksIfOwnerMatch +StdEnvVars +CompatEnvVars +ExportCertData +FakeBasicAuth +StrictRequire +OptRenegotiate + +SDBM +GDBM +NDBM +DB +MD5 +MD5-sess +auth +auth-int +never +searching +finding +always +Basic +Digest +Connection +Keep-Alive +Proxy-Authenticate +Proxy-Authorization +TE +Trailers +Transfer-Encoding +Upgrade +Netscape +Cookie +Cookie2 +RFC2109 +RFC2965 +INode +MTime +Size +Prefer +Fallback +Double +error +nocontent +map +referer +formatted +semiformatted +unformatted +Ascending +Descending +Name +Date +Size +Description +SSL +TLS +STARTTLS +emerg +alert +crit +error +warn +notice +info +debug +LRU +GDSF +Any +NegotiatedOnly +Filters +Handlers +Deny,Allow +Allow,Deny +Mutual-failure +IsError +Ignore +StartBody +Full +Block +inherit +Registry +Registry-Strict +Script +EMail +Major +Minor +Min +Minimal +Prod +ProductOnly +OS +Full +optional +posixsem +sysvsem +sem +pthread +fcntl: +flock: +file: +yes +no +SSLv2 +SSLv3 +TLSv1 +require +optional_no_ca +nonenotnull +dbm: +shm: +dc: +DNS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/asm-avr.xml b/kate/data/asm-avr.xml new file mode 100644 index 000000000..b9c377191 --- /dev/null +++ b/kate/data/asm-avr.xml @@ -0,0 +1,208 @@ + + + + + + + + adc + add + adiw + and + andi + asr + bclr + bld + brbc + brbs + break + breq + brge + brhc + brhs + brid + brie + brlo + brlt + brmi + brne + brpl + brsh + brtc + brts + brvc + brvs + bset + bst + call + cbi + cbr + clc + clh + cli + cln + clr + cls + clt + clv + clz + com + cp + cpc + cpi + cpse + dec + eicall + eijmp + elpm + eor + fmul + fmuls + fmulsu + icall + ijmp + in + inc + jmp + ld + ldi + lds + lpm + lsl + lsr + mov + movw + mul + muls + mulsu + neg + nop + or + ori + out + pop + push + rcall + ret + reti + rjmp + rol + ror + sbc + sbr + sbrc + sbrs + sec + seh + sbi + sbci + sbic + sbis + sbiw + sei + sen + ser + ses + set + sev + sez + sleep + spm + st + sts + sub + subi + swap + tst + wdr + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/asm6502.xml b/kate/data/asm6502.xml new file mode 100644 index 000000000..8d3e7261c --- /dev/null +++ b/kate/data/asm6502.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/asp.xml b/kate/data/asp.xml new file mode 100644 index 000000000..1aa4f92d7 --- /dev/null +++ b/kate/data/asp.xml @@ -0,0 +1,393 @@ + + + + + + select + case + end select + + if + then + else + elseif + end if + + + while + do + until + loop + wend + + for + each + to + in + next + + exit + continue + + + dim + redim + preserve + + const + erase + nothing + set + + new + me + + + function + sub + call + + class + private + public + with + + randomize + + open + close + movenext + execute + eof + + not + true + false + or + and + xor + + + response + write + redirect + end + + request + form + querystring + servervariables + cookies + + session + + server + createobject + + abs + array + asc + atn + cbool + cbyte + ccur + cdate + cdbl + chr + cint + clng + cos + csng + cstr + date + dateadd + + DateDiff + DatePart + DateSerial + DateValue + Date + Day + Exp + Filter + Fix + FormatCurrency + FormatDateTime + FormatNumber + FormatPercent + + GetObject + Hex + Hour + InputBox + InStr + InStrRev + Int + IsArray + IsDate + IsEmpty + IsNull + IsNumeric + IsObject + Join + LBound + LCase + + Left + Len + LoadPicture + Log + LTrim + Mid + Minute + Month + MonthName + MsgBox + Now + Oct + Replace + + RGB + Right + Rnd + Round + RTrim + + ScriptEngine + ScriptEngineBuildVersion + ScriptEngineMajorVersion + ScriptEngineMinorVersion + Second + Sgn + Sin + Space + Split + Sqr + StrComp + StrReverse + String + Tan + Time + Timer + TimeSerial + TimeValue + Trim + TypeName + UBound + UCase + VarType + Weekday + WeekdayName + Year + + Add + AddFolders + BuildPath + Clear + Close + Copy + CopyFile + CopyFolder + CreateFolder + CreateTextFile + Delete + DeleteFile + DeleteFolder + DriveExists + Exists + FileExists + FolderExists + GetAbsolutePathName + GetBaseName + GetDrive + GetDriveName + GetExtensionName + GetFile + GetFileName + GetFolder + GetParentFolderName + + GetSpecialFolder + GetTempName + Items + item + Keys + Move + MoveFile + MoveFolder + OpenAsTextStream + OpenTextFile + Raise + Read + ReadAll + ReadLine + Remove + RemoveAll + Skip + SkipLine + Write + WriteBlankLines + WriteLine + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/awk.xml b/kate/data/awk.xml new file mode 100644 index 000000000..0f16ca4cc --- /dev/null +++ b/kate/data/awk.xml @@ -0,0 +1,112 @@ + + + + + + if + else + while + do + for + in + continue + break + print + printf + getline + function + return + next + exit + + + ARGC + ARGV + CONVFMT + ENVIRON + FILENAME + FNR + FS + NF + NR + OFMT + OFS + ORS + RS + RSTART + RLENGTH + SUBSEP + + + gsub + gensub + index + length + match + split + sprintf + sub + substr + tolower + toupper + atan2 + cos + exp + int + log + rand + sin + sqrt + srand + close + fflush + system + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/bash.xml b/kate/data/bash.xml new file mode 100644 index 000000000..7fe38d3a4 --- /dev/null +++ b/kate/data/bash.xml @@ -0,0 +1,829 @@ + + + + + + +]> + + + + + + + else + for + function + in + select + until + while + . + elif + then + set + + + + : + . + source + alias + bg + bind + break + builtin + cd + command + compgen + complete + continue + dirs + disown + echo + enable + eval + exec + exit + fc + fg + getopts + hash + help + history + jobs + kill + let + logout + popd + printf + pushd + pwd + return + set + shift + shopt + suspend + test + times + trap + type + ulimit + umask + unalias + wait + + + + export + unset + declare + typeset + local + read + readonly + + + + + arch + awk + bash + bunzip2 + bzcat + bzcmp + bzdiff + bzegrep + bzfgrep + bzgrep + bzip2 + bzip2recover + bzless + bzmore + cat + chattr + chgrp + chmod + chown + chvt + cp + date + dd + deallocvt + df + dir + dircolors + dmesg + dnsdomainname + domainname + du + dumpkeys + echo + ed + egrep + false + fgconsole + fgrep + fuser + gawk + getkeycodes + gocr + grep + groups + gunzip + gzexe + gzip + hostname + igawk + install + kbd_mode + kbdrate + killall + last + lastb + link + ln + loadkeys + loadunimap + login + ls + lsattr + lsmod + lsmod.old + mapscrn + mesg + mkdir + mkfifo + mknod + mktemp + more + mount + mv + nano + netstat + nisdomainname + openvt + pgawk + pidof + ping + ps + pstree + pwd + rbash + readlink + red + resizecons + rm + rmdir + run-parts + sash + sed + setfont + setkeycodes + setleds + setmetamode + setserial + sh + showkey + shred + sleep + ssed + stat + stty + su + sync + tar + tempfile + touch + true + umount + uname + unicode_start + unicode_stop + unlink + utmpdump + uuidgen + vdir + wall + wc + ypdomainname + zcat + zcmp + zdiff + zegrep + zfgrep + zforce + zgrep + zless + zmore + znew + zsh + + + aclocal + aconnect + aplay + apm + apmsleep + apropos + ar + arecord + as + as86 + autoconf + autoheader + automake + awk + basename + bc + bison + c++ + cal + cat + cc + cdda2wav + cdparanoia + cdrdao + cd-read + cdrecord + chfn + chgrp + chmod + chown + chroot + chsh + clear + cmp + co + col + comm + cp + cpio + cpp + cut + dc + dd + df + diff + diff3 + dir + dircolors + directomatic + dirname + du + env + expr + fbset + file + find + flex + flex++ + fmt + free + ftp + funzip + fuser + g++ + gawk + gc + gcc + gdb + getent + getopt + gettext + gettextize + gimp + gimp-remote + gimptool + gmake + gs + head + hexdump + id + install + join + kill + killall + ld + ld86 + ldd + less + lex + ln + locate + lockfile + logname + lp + lpr + ls + lynx + m4 + make + man + mkdir + mknod + msgfmt + mv + namei + nasm + nawk + nice + nl + nm + nm86 + nmap + nohup + nop + od + passwd + patch + pcregrep + pcretest + perl + perror + pidof + pr + printf + procmail + prune + ps2ascii + ps2epsi + ps2frag + ps2pdf + ps2ps + psbook + psmerge + psnup + psresize + psselect + pstops + rcs + rev + rm + scp + sed + seq + setterm + shred + size + size86 + skill + slogin + snice + sort + sox + split + ssh + ssh-add + ssh-agent + ssh-keygen + ssh-keyscan + stat + strings + strip + sudo + suidperl + sum + tac + tail + tee + test + tr + uniq + unlink + unzip + updatedb + updmap + uptime + users + vmstat + w + wc + wget + whatis + whereis + which + who + whoami + write + xargs + yacc + yes + zip + zsoelim + + + dcop + kdialog + kfile + xhost + xmodmap + xset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/bibtex.xml b/kate/data/bibtex.xml new file mode 100644 index 000000000..b1c225521 --- /dev/null +++ b/kate/data/bibtex.xml @@ -0,0 +1,65 @@ + + + + + + @article + @book + @booklet + @conference + @inbook + @incollection + @inproceedings + @manual + @mastersthesis + @misc + @phdthesis + @proceedings + @techreport + @unpublished + @collection + @patent + + + @string + @preamble + @comment + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/c.xml b/kate/data/c.xml new file mode 100644 index 000000000..d4e8f1dd4 --- /dev/null +++ b/kate/data/c.xml @@ -0,0 +1,167 @@ + + + + + + break + case + continue + default + do + else + enum + extern + for + goto + if + inline + return + sizeof + struct + switch + typedef + union + while + + + auto + char + const + double + float + int + long + register + restrict + short + signed + static + unsigned + void + volatile + int8_t + int16_t + int32_t + int64_t + uint8_t + uint16_t + uint32_t + uint64_t + wchar_t + _Imaginary + _Complex + _Bool + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cg.xml b/kate/data/cg.xml new file mode 100644 index 000000000..338d0d23a --- /dev/null +++ b/kate/data/cg.xml @@ -0,0 +1,288 @@ + + + + + + + + + POSITION + COLOR + COLOR0 + COLOR1 + COLOR2 + COLOR3 + TEXCOORD0 + TEXCOORD1 + TEXCOORD2 + TEXCOORD3 + TEXCOORD4 + TEXCOORD5 + TEXCOORD6 + TEXCOORD7 + TEXCOORD8 + TEXCOORD9 + TEXCOORD10 + TEXCOORD11 + TEXCOORD12 + TEXCOORD13 + TEXCOORD14 + TEXCOORD15 + TEXUNIT0 + TEXUNIT1 + TEXUNIT2 + TEXUNIT3 + TEXUNIT4 + TEXUNIT5 + TEXUNIT6 + TEXUNIT7 + TEXUNIT8 + TEXUNIT9 + TEXUNIT10 + TEXUNIT11 + TEXUNIT12 + TEXUNIT13 + TEXUNIT14 + TEXUNIT15 + WPOS + DEPTH + BLENDWEIGHT + NORMAL + TESSFACTOR + FOGCOORD + PSIZE + BLENDINDICES + TANGENT + BINORMAL + FOG + BCOL0 + BCOL1 + FACE + + + do + while + if + else + for + struct + return + static + typedef + discard + true + false + + + bool + int + fixed + half + float + + void + sampler + sampler1D + sampler2D + sampler3D + samplerCUBE + samplerRECT + + packed + const + uniform + in + out + inout + + + FIXME + TODO + BUG + + + abs + acos + all + any + asin + atan + atan2 + ceil + clamp + cos + cosh + cross + degrees + determinant + dot + exp + exp2 + floor + fmod + frac + frexp + isfinite + isinf + isnan + ldexp + lerp + lit + log + log2 + log10 + max + min + modf + mul + noise + pow + radians + round + rsqrt + saturate + sign + sin + sincos + sinh + smoothstep + step + sqrt + tan + tanh + transpose + distance + faceforward + length + normalize + reflect + refract + tex1D + tex1Dproj + tex2D + tex2Dproj + texRECT + texRECTproj + tex3D + tex3Dproj + texCUBE + texCUBEproj + ddx + ddy + debug + pack_2half + unpack_2half + pack_2ushort + unpack_2ushort + pack_4byte + unpack_4byte + pack_4ubyte + unpack_4ubyte + + + fragout + fragout_float + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cgis.xml b/kate/data/cgis.xml new file mode 100644 index 000000000..dda121fe7 --- /dev/null +++ b/kate/data/cgis.xml @@ -0,0 +1,146 @@ + + + + + + 1D + 2D + break + continue + do + else + extern + for + forall + foreach + function + if + in + inout + internal + out + reduction + return + struct + typedef + while + + + bool + bool2 + bool3 + bool4 + int + int2 + int3 + int4 + half + half2 + half3 + half4 + float + float2 + float3 + float4 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/changelog.xml b/kate/data/changelog.xml new file mode 100644 index 000000000..aec339214 --- /dev/null +++ b/kate/data/changelog.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cisco.xml b/kate/data/cisco.xml new file mode 100644 index 000000000..47c788807 --- /dev/null +++ b/kate/data/cisco.xml @@ -0,0 +1,312 @@ + + + + + + aaa + access-list + address + alias + arp + async-bootp + banner + boot + bridge + buffers + busy-message + call-history-mib + cdp + chat-script + class-map + clock + cns + config-register + controller + crypto + default + default-value + dialer + dialer-list + dnsix-dmdp + dnsix-nat + downward-compatible-config + enable + end + exception + exit + file + frame-relay + help + hostname + interface + ip + isdn + isdn-mib + kerberos + key + line + logging + login-string + map-class + map-list + memory-size + menu + modemcap + multilink + netbios + no + ntp + partition + policy-map + priority-list + privilege + process-max-time + prompt + queue-list + resume-string + rlogin + rmon + route-map + router + rtr + scheduler + service + snmp-server + sntp + stackmaker + state-machine + subscriber-policy + tacacs-server + template + terminal-queue + tftp-server + time-range + username + virtual-profile + virtual-template + vpdn + vpdn-group + x25 + x29 + + + accounting + accounting-list + accounting-threshold + accounting-transits + address-pool + as-path + audit + auth-proxy + authentication + authorization + bgp-community + bootp + cef + classless + community-list + default-gateway + default-network + dhcp + dhcp-server + domain-list + domain-lookup + domain-name + dvmrp + exec-callback + extcommunity-list + finger + flow-aggregation + flow-cache + flow-export + forward-protocol + ftp + gratuitous-arps + host + host-routing + hp-host + http + icmp + inspect + local + mrm + mroute + msdp + multicast + multicast-routing + name-server + nat + new-model + ospf + password + password-encryption + pgm + pim + port-map + prefix-list + radius + rcmd + reflexive-list + route + routing + rsvp + rtcp + sap + sdr + security + source-route + subnet-zero + tacacs + tcp + tcp-small-servers + telnet + tftp + timestamps + udp-small-servers + vrf + wccp + + + accounting + accounting-list + accounting-threshold + accounting-transits + address-pool + as-path + audit + auth-proxy + authentication + authorization + bgp-community + bootp + cef + classless + community-list + default-gateway + default-network + dhcp + dhcp-server + domain-list + domain-lookup + domain-name + dvmrp + exec-callback + extcommunity-list + finger + flow-aggregation + flow-cache + flow-export + forward-protocol + ftp + gratuitous-arps + host + host-routing + hp-host + http + icmp + inspect + local + mrm + mroute + msdp + multicast + multicast-routing + name-server + nat + new-model + ospf + password + password-encryption + pgm + pim + port-map + prefix-list + radius + rcmd + reflexive-list + route + routing + rsvp + rtcp + sap + sdr + security + source-route + subnet-zero + tacacs + tcp + tcp-small-servers + telnet + tftp + timestamps + udp-small-servers + vrf + wccp + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/clipper.xml b/kate/data/clipper.xml new file mode 100644 index 000000000..11bba638a --- /dev/null +++ b/kate/data/clipper.xml @@ -0,0 +1,501 @@ + + + + + + + + .and. + announce + begin + case + command + define + do + elseif + else + endcase + enddo + endif + error + exit + field + .f. + for + function + ifdef + if + include + init + inndef + local + memvar + next + nil + .not. + .or. + other + parameters + private + procedure + public + request + return + sequence + static + stdout + .t. + traslate + undef + while + xcommand + xtranslate + + + + + accept + all + alternate + append + ascending + average + bell + blank + box + century + clear + close + coclor + color + commit + confirm + console + continue + copy + count + create + cursor + date + decimals + default + deleted + delete + delimiters + descending + device + display + do + eject + epoch + erase + escape + eval + every + exact + extended + file + filter + fixed + form + from + get + gets + go + goto + index + input + intensity + ? + ?? + @ + join + keyboard + key + label + list + locate + margin + memory + menu + message + new + on + order + pack + path + pict + printer + prompt + quit + range + read + recall + record + reindex + relation + release + rename + replace + report + rest + restore + run + save + say + scoreboard + seek + select + set + skip + softseek + sort + structure + sum + tag + to + total + typeahead + type + unique + unlock + update + use + valid + wait + when + with + wrap + zap + + + + + aadd + abs + achoice + aclone + acopy + adel + aeval + afill + ains + alert + alias + alltrim + altd + array + ascan + asize + asort + atail + at + bin2i + bin2l + bin2w + bof + break + browse + cdowchr + chr + cmonth + col + colorselect + ctod + curdir + date + day + dbappend + dbclearall + dbclearfilter + dbclearindex + dbclearrelation + dbcloseall + dbclosearea + dbcommitall + dbcommit + dbcreateindex + dbcreate + dbdelete + dbedit + dbeval + dbfilter + dbf + dbgobottom + dbgoto + dbgotop + dbrecall + dbreindex + dbrelation + dbrlock + dbrlocklist + dbrselect + dbrunlock + dbseek + dbselectarea + dbsetfilter + dbsetindex + dbsetorder + dbsetrelation + dbskip + dbstruct + dbunlockall + dbunlock + dbusearea + deleted + descend + devout + devpos + directory + dispbegin + dispbox + dispcount + dispend + dispout + dispspace + doserror + dow + dtoc + dtos + empty + eof + errorblock + errorinhandler + errorlevel + eval + exp + fclose + fcount + fcreate + ferase + ferror + fieldblock + fieldget + field + fieldname + fieldpos + fieldput + fieldwblock + file + flock + fopen + found + fread + freadstr + frename + fseek + fwrite + getactive + getenv + hardcr + header + i2bin + iif + indexext + indexkey + indexord + inkey + int + isalpha + iscolor + isdigit + islower + isprinter + isupper + l2bin + lastkey + lastrec + left + len + lock + log + lower + ltrim + lupdate + maxcol + max + maxrow + memoedit + memoline + memoread + memory + memotran + memowrit + memvarblock + min + mlcount + mlctopos + mlpos + mod + month + mpostolc + neterr + netname + nextkey + nosnow + ordbagext + ordbagname + ordcreate + orddestroy + ordfor + ordkey + ordlistadd + ordlistclear + ordlistrebuild + ordname + ordnumber + ordsetfocus + os + outerr + outstd + padc + padl + padr + pcol + pcount + proclineprocname + prow + qout + qqout + rat + rddlist + rddname + rddsetdefault + readexit + readinsert + readmodal + readvar + reccount + recno + recsize + replicate + restscreen + right + rlock + round + row + rtrim + savesreen + scroll + seconds + select + setblink + setcancel + setcolor + setcursor + setkey + setmode + setpos + setprc + soundex + space + sqrt + str + strtran + stuff + substr + time + tone + transform + trim + updated + upper + used + val + valtype + version + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cmake.xml b/kate/data/cmake.xml new file mode 100644 index 000000000..0fa775860 --- /dev/null +++ b/kate/data/cmake.xml @@ -0,0 +1,352 @@ + + + + + + + + + ADD_CUSTOM_COMMAND + ADD_CUSTOM_TARGET + ADD_DEFINITIONS + ADD_DEPENDENCIES + ADD_EXECUTABLE + ADD_LIBRARY + ADD_SUBDIRECTORY + ADD_TEST + AUX_SOURCE_DIRECTORY + BREAK + BUILD_COMMAND + BUILD_NAME + CMAKE_MINIMUM_REQUIRED + CMAKE_POLICY + CONFIGURE_FILE + CREATE_TEST_SOURCELIST + DEFINE_PROPERTY + ELSE + ELSEIF + ENABLE_LANGUAGE + ENABLE_TESTING + ENDFOREACH + ENDFUNCTION + ENDIF + ENDMACRO + ENDWHILE + EXECUTE_PROCESS + EXEC_PROGRAM + EXPORT + EXPORT_LIBRARY_DEPENDENCIES + FILE + FIND_FILE + FIND_LIBRARY + FIND_PACKAGE + FIND_PATH + FIND_PROGRAM + FLTK_WRAP_UI + FOREACH + FUNCTION + GET_CMAKE_PROPERTY + GET_DIRECTORY_PROPERTY + GET_FILENAME_COMPONENT + GET_PROPERTY + GET_SOURCE_FILE_PROPERTY + GET_TARGET_PROPERTY + GET_TEST_PROPERTY + IF + INCLUDE + INCLUDE_DIRECTORIES + INCLUDE_EXTERNAL_MSPROJECT + INCLUDE_REGULAR_EXPRESSION + INSTALL + INSTALL_FILES + INSTALL_PROGRAMS + INSTALL_TARGETS + ITK_WRAP_TCL + LINK_DIRECTORIES + LINK_LIBRARIES + LIST + LOAD_CACHE + LOAD_COMMAND + MACRO + MAKE_DIRECTORY + MARK_AS_ADVANCED + MATH + MESSAGE + OPTION + OUTPUT_REQUIRED_FILES + PROJECT + QT_WRAP_CPP + QT_WRAP_UI + REMOVE + REMOVE_DEFINITIONS + RETURN + SEPARATE_ARGUMENTS + SET + SET_DIRECTORY_PROPERTIES + SET_PROPERTY + SET_SOURCE_FILES_PROPERTIES + SET_TARGET_PROPERTIES + SITE_NAME + SOURCE_GROUP + STRING + SUBDIRS + SUBDIR_DEPENDS + TARGET_LINK_LIBRARIES + TRY_COMPILE + TRY_RUN + UNSET + UTILITY_SOURCE + VARIABLE_REQUIRES + VARIABLE_WATCH + VTK_MAKE_INSTANTIATOR + VTK_WRAP_JAVA + VTK_WRAP_PYTHON + VTK_WRAP_TCL + WRITE_FILE + + + + ABSOLUTE + ABSTRACT + ADDITIONAL_MAKE_CLEAN_FILES + ALL + AND + APPEND + ARCHIVE + ARGS + ASCII + BEFORE + BRIEF_DOCS + BUNDLE + CACHE + CACHE_VARIABLES + CLEAR + CMAKE_FLAGS + CMAKE_FIND_ROOT_PATH_BOTH + CODE + COMMAND + COMMANDS + COMMAND_NAME + COMMENT + COMPARE + COMPILE_FLAGS + COMPONENT + COMPONENTS + CONFIGURATIONS + CONFIGURE + COPYONLY + DEFINED + DEFINE_SYMBOL + DEFINITION + DEPENDS + DESTINATION + DIRECTORY + DIRECTORY_PERMISSIONS + DOC + DOWNLOAD + EQUAL + ESCAPE_QUOTES + EXACT + EXCLUDE + EXCLUDE_FROM_ALL + EXISTS + EXPORT + EXPR + EXT + EXTRA_INCLUDE + FATAL_ERROR + FILE + FILES + FILE_PERMISSIONS + FILES_MATCHING + FORCE + FRAMEWORK + FULL_DOCS + GENERATED + GET + GLOB + GLOB_RECURSE + GLOBAL + GREATER + GROUP_SIZE + HEADER_FILE_ONLY + HEADER_LOCATION + HINTS + IMMEDIATE + INCLUDES + INCLUDE_DIRECTORIES + INCLUDE_INTERNALS + INCLUDE_REGULAR_EXPRESSION + INHERITED + INTERNAL + IS_ABSOLUTE + IS_NEWER_THAN + LENGTH + LESS + LIBRARY + LINK_DIRECTORIES + LINK_FLAGS + LINK_INTERFACE_LIBRARIES + LOCATION + MACOSX_BUNDLE + MACROS + MAIN_DEPENDENCY + MAKE_DIRECTORY + MATCH + MATCHALL + MATCHES + MODULE + NAME + NAMELINK_ONLY + NAMELINK_SKIP + NAMES + NAME_WE + NOT + NOTEQUAL + NO_CMAKE_PATH + NO_CMAKE_ENVIRONMENT_PATH + NO_CMAKE_FIND_ROOT_PATH + NO_DEFAULT_PATH + NO_MODULE + NO_SYSTEM_PATH + NO_SYSTEM_ENVIRONMENT_PATH + OBJECT_DEPENDS + ONLY_CMAKE_FIND_ROOT_PATH + OPTIONAL + OR + OUTPUT + OUTPUT_VARIABLE + PARENT_SCOPE + PATH + PATHS + PATH_SUFFIXES + PATTERN + PERMISSIONS + POLICY + POP + POST_BUILD + POST_INSTALL_SCRIPT + PREFIX + PREORDER + PRE_BUILD + PRE_INSTALL_SCRIPT + PRE_LINK + PRIVATE_HEADER + PROGRAM + PROGRAMS + PROGRAM_ARGS + PROPERTIES + PUBLIC_HEADER + PUSH + QUIET + RANDOM + RANGE + READ + REGEX + REGULAR_EXPRESSION + RELATIVE_PATH + REMOVE + REMOVE_RECURSE + RENAME + REPLACE + REQUIRED + RESOURCE + RETURN_VALUE + RUNTIME + RUNTIME_DIRECTORY + SCRIPT + SEND_ERROR + SHARED + SOURCE + SOURCES + STATIC + STATUS + STRIP + STRINGS + STREQUAL + STRGREATER + STRLESS + SUFFIX + SUBSTRING + TARGET + TARGETS + TIMEOUT + TOLOWER + TOUPPER + TO_CMAKE_PATH + TO_NATIVE_PATH + USE_SOURCE_PERMISSIONS + VAR + VARIABLE + VARIABLES + VERSION + VERSION_LESS + VERSION_EQUAL + VERSION_GREATER + WIN32 + WORKING_DIRECTORY + WRAP_EXCLUDE + WRITE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/coldfusion.xml b/kate/data/coldfusion.xml new file mode 100644 index 000000000..9e49e4af6 --- /dev/null +++ b/kate/data/coldfusion.xml @@ -0,0 +1,732 @@ + + + + + + + + + if + else + for + in + while + do + continue + break + with + try + catch + switch + case + new + var + function + return + this + delete + true + false + void + throw + typeof + const + default + + + + + + Anchor + Applet + Area + Array + Boolean + Button + Checkbox + Date + Document + Event + FileUpload + Form + Frame + Function + Hidden + History + Image + Layer + Linke + Location + Math + Navigator + Number + Object + Option + Password + Radio + RegExp + Reset + Screen + Select + String + Submit + Text + Textarea + Window + + + + + + abs + acos + alert + anchor + apply + asin + atan + atan2 + back + blur + call + captureEvents + ceil + charAt + charCodeAt + clearInterval + clearTimeout + click + close + compile + concat + confirm + cos + disableExternalCapture + enableExternalCapture + eval + exec + exp + find + floor + focus + forward + fromCharCode + getDate + getDay + getFullYear + getHours + getMilliseconds + getMinutes + getMonth + getSeconds + getSelection + getTime + getTimezoneOffset + getUTCDate + getUTCDay + getUTCFullYear + getUTCHours + getUTCMilliseconds + getUTCMinutes + getUTCMonth + getUTCSeconds + go + handleEvent + home + indexOf + javaEnabled + join + lastIndexOf + link + load + log + match + max + min + moveAbove + moveBelow + moveBy + moveTo + moveToAbsolute + open + parse + plugins.refresh + pop + pow + preference + print + prompt + push + random + releaseEvents + reload + replace + reset + resizeBy + resizeTo + reverse + round + routeEvent + scrollBy + scrollTo + search + select + setDate + setFullYear + setHours + setInterval + setMilliseconds + setMinutes + setMonth + setSeconds + setTime + setTimeout + setUTCDate + setUTCFullYear + setUTCHours + setUTCMilliseconds + setUTCMinutes + setUTCMonth + setUTCSeconds + shift + sin + slice + sort + splice + split + sqrt + stop + String formatting + submit + substr + substring + taintEnabled + tan + test + toLocaleString + toLowerCase + toSource + toString + toUpperCase + toUTCString + unshift + unwatch + UTC + valueOf + watch + write + writeln + + + + + + break + case + catch + continue + default + do + else + for + function + if + in + return + switch + try + var + while + + + + + + Abs + ACos + ArrayAppend + ArrayAvg + ArrayClear + ArrayDeleteAt + ArrayInsertAt + ArrayIsEmpty + ArrayLen + ArrayMax + ArrayMin + ArrayNew + ArrayPrepend + ArrayResize + ArraySet + ArraySort + ArraySum + ArraySwap + ArrayToList + Asc + ASin + Atn + BitAnd + BitMaskClear + BitMaskRead + BitMaskSet + BitNot + BitOr + BitSHLN + BitSHRN + BitXor + Ceiling + Chr + CJustify + Compare + CompareNoCase + Cos + CreateDate + CreateDateTime + CreateObject + CreateODBCDate + CreateODBCDateTime + CreateODBCTime + CreateTime + CreateTimeSpan + CreateUUID + DateAdd + DateCompare + DateConvert + DateDiff + DateFormat + DatePart + Day + DayOfWeek + DayOfWeekAsString + DayOfYear + DaysInMonth + DaysInYear + DE + DecimalFormat + DecrementValue + Decrypt + DeleteClientVariable + DirectoryExists + DollarFormat + Duplicate + Encrypt + Evaluate + Exp + ExpandPath + FileExists + Find + FindNoCase + FindOneOf + FirstDayOfMonth + Fix + FormatBaseN + GetAuthUser + GetBaseTagData + GetBaseTagList + GetBaseTemplatePath + GetClientVariablesList + GetCurrentTemplatePath + GetDirectoryFromPath + GetException + GetFileFromPath + GetFunctionList + GetHttpRequestData + GetHttpTimeString + GetK2ServerDocCount + GetK2ServerDocCountLimit + GetLocale + GetMetaData + GetMetricData + GetPageContext + GetProfileSections + GetProfileString + GetServiceSettings + GetTempDirectory + GetTempFile + GetTemplatePath + GetTickCount + GetTimeZoneInfo + GetToken + Hash + Hour + HTMLCodeFormat + HTMLEditFormat + IIf + IncrementValue + InputBaseN + Insert + Int + IsArray + IsBinary + IsBoolean + IsCustomFunction + IsDate + IsDebugMode + IsDefined + IsK2ServerABroker + IsK2ServerDocCountExceeded + IsK2ServerOnline + IsLeapYear + IsNumeric + IsNumericDate + IsObject + IsQuery + IsSimpleValue + IsStruct + IsUserInRole + IsWDDX + IsXmlDoc + IsXmlElement + IsXmlRoot + JavaCast + JSStringFormat + LCase + Left + Len + ListAppend + ListChangeDelims + ListContains + ListContainsNoCase + ListDeleteAt + ListFind + ListFindNoCase + ListFirst + ListGetAt + ListInsertAt + ListLast + ListLen + ListPrepend + ListQualify + ListRest + ListSetAt + ListSort + ListToArray + ListValueCount + ListValueCountNoCase + LJustify + Log + Log10 + LSCurrencyFormat + LSDateFormat + LSEuroCurrencyFormat + LSIsCurrency + LSIsDate + LSIsNumeric + LSNumberFormat + LSParseCurrency + LSParseDateTime + LSParseEuroCurrency + LSParseNumber + LSTimeFormat + LTrim + Max + Mid + Min + Minute + Month + MonthAsString + Now + NumberFormat + ParagraphFormat + ParameterExists + ParseDateTime + Pi + PreserveSingleQuotes + Quarter + QueryAddColumn + QueryAddRow + QueryNew + QuerySetCell + QuotedValueList + Rand + Randomize + RandRange + REFind + REFindNoCase + RemoveChars + RepeatString + Replace + ReplaceList + ReplaceNoCase + REReplace + REReplaceNoCase + Reverse + Right + RJustify + Round + RTrim + Second + SetEncoding + SetLocale + SetProfileString + SetVariable + Sgn + Sin + SpanExcluding + SpanIncluding + Sqr + StripCR + StructAppend + StructClear + StructCopy + StructCount + StructDelete + StructFind + StructFindKey + StructFindValue + StructGet + StructInsert + StructIsEmpty + StructKeyArray + StructKeyExists + StructKeyList + StructNew + StructSort + StructUpdate + Tan + TimeFormat + ToBase64 + ToBinary + ToString + Trim + UCase + URLDecode + URLEncodedFormat + URLSessionFormat + Val + ValueList + Week + WriteOutput + XmlChildPos + XmlElemNew + XmlFormat + XmlNew + XmlParse + XmlSearch + XmlTransform + Year + YesNoFormat + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/commonlisp.xml b/kate/data/commonlisp.xml new file mode 100644 index 000000000..880929c81 --- /dev/null +++ b/kate/data/commonlisp.xml @@ -0,0 +1,1173 @@ + + + + + + + < + <= + = + > + >= + => + - + / + /= + // + /// + * + ** + *** + + + ++ + +++ + 1- + 1+ + + + defclass + defconstant + defgeneric + define-compiler-macro + define-condition + define-method-combination + define-modify-macro + define-setf-expander + define-setf-method + define-symbol-macro + defmacro + defmethod + defpackage + defparameter + defsetf + deftype + defvar + defun + defstruct + + + abort + abs + access + acons + acos + acosh + add-method + adjoin + adjustable-array-p + adjust-array + allocate-instance + alpha-char-p + alphanumericp + and + append + apply + applyhook + apropos + apropos-list + aref + arithmetic-error + arithmetic-error-operands + arithmetic-error-operation + array + array-dimension + array-dimension-limit + array-dimensions + array-displacement + array-element-type + array-has-fill-pointer-p + array-in-bounds-p + arrayp + array-rank + array-rank-limit + array-row-major-index + array-total-size + array-total-size-limit + ash + asin + asinh + assert + assoc + assoc-if + assoc-if-not + atan + atanh + atom + base-char + base-string + bignum + bit + bit-and + bit-andc1 + bit-andc2 + bit-eqv + bit-ior + bit-nand + bit-nor + bit-not + bit-orc1 + bit-orc2 + bit-vector + bit-vector-p + bit-xor + block + boole + boole-1 + boole-2 + boolean + boole-and + boole-andc1 + boole-andc2 + boole-c1 + boole-c2 + boole-clr + boole-eqv + boole-ior + boole-nand + boole-nor + boole-orc1 + boole-orc2 + boole-set + boole-xor + both-case-p + boundp + break + broadcast-stream + broadcast-stream-streams + built-in-class + butlast + byte + byte-position + byte-size + call-arguments-limit + call-method + call-next-method + capitalize + car + case + catch + ccase + cdr + ceiling + cell-error + cell-error-name + cerror + change-class + char + char< + char<= + char= + char> + char>= + char/= + character + characterp + char-bit + char-bits + char-bits-limit + char-code + char-code-limit + char-control-bit + char-downcase + char-equal + char-font + char-font-limit + char-greaterp + char-hyper-bit + char-int + char-lessp + char-meta-bit + char-name + char-not-equal + char-not-greaterp + char-not-lessp + char-super-bit + char-upcase + check-type + cis + class + class-name + class-of + clear-input + clear-output + close + clrhash + code-char + coerce + commonp + compilation-speed + compile + compiled-function + compiled-function-p + compile-file + compile-file-pathname + compiler-let + compiler-macro + compiler-macro-function + complement + complex + complexp + compute-applicable-methods + compute-restarts + concatenate + concatenated-stream + concatenated-stream-streams + cond + condition + conjugate + cons + consp + constantly + constantp + continue + control-error + copy-alist + copy-list + copy-pprint-dispatch + copy-readtable + copy-seq + copy-structure + copy-symbol + copy-tree + cos + cosh + count + count-if + count-if-not + ctypecase + debug + decf + declaim + declaration + declare + decode-float + decode-universal-time + delete + delete-duplicates + delete-file + delete-if + delete-if-not + delete-package + denominator + deposit-field + describe + describe-object + destructuring-bind + digit-char + digit-char-p + directory + directory-namestring + disassemble + division-by-zero + do + do* + do-all-symbols + documentation + do-exeternal-symbols + do-external-symbols + dolist + do-symbols + dotimes + double-float + double-float-epsilon + double-float-negative-epsilon + dpb + dribble + dynamic-extent + ecase + echo-stream + echo-stream-input-stream + echo-stream-output-stream + ed + eighth + elt + encode-universal-time + end-of-file + endp + enough-namestring + ensure-directories-exist + ensure-generic-function + eq + eql + equal + equalp + error + etypecase + eval + evalhook + eval-when + evenp + every + exp + export + expt + extended-char + fboundp + fceiling + fdefinition + ffloor + fifth + file-author + file-error + file-error-pathname + file-length + file-namestring + file-position + file-stream + file-string-length + file-write-date + fill + fill-pointer + find + find-all-symbols + find-class + find-if + find-if-not + find-method + find-package + find-restart + find-symbol + finish-output + first + fixnum + flet + float + float-digits + floating-point-inexact + floating-point-invalid-operation + floating-point-overflow + floating-point-underflow + floatp + float-precision + float-radix + float-sign + floor + fmakunbound + force-output + format + formatter + fourth + fresh-line + fround + ftruncate + ftype + funcall + function + function-keywords + function-lambda-expression + functionp + gbitp + gcd + generic-function + gensym + gentemp + get + get-decoded-time + get-dispatch-macro-character + getf + gethash + get-internal-real-time + get-internal-run-time + get-macro-character + get-output-stream-string + get-properties + get-setf-expansion + get-setf-method + get-universal-time + go + graphic-char-p + handler-bind + handler-case + hash-table + hash-table-count + hash-table-p + hash-table-rehash-size + hash-table-rehash-threshold + hash-table-size + hash-table-test + host-namestring + identity + if + if-exists + ignorable + ignore + ignore-errors + imagpart + import + incf + initialize-instance + inline + in-package + in-package + input-stream-p + inspect + int-char + integer + integer-decode-float + integer-length + integerp + interactive-stream-p + intern + internal-time-units-per-second + intersection + invalid-method-error + invoke-debugger + invoke-restart + invoke-restart-interactively + isqrt + keyword + keywordp + labels + lambda + lambda-list-keywords + lambda-parameters-limit + last + lcm + ldb + ldb-test + ldiff + least-negative-double-float + least-negative-long-float + least-negative-normalized-double-float + least-negative-normalized-long-float + least-negative-normalized-short-float + least-negative-normalized-single-float + least-negative-short-float + least-negative-single-float + least-positive-double-float + least-positive-long-float + least-positive-normalized-double-float + least-positive-normalized-long-float + least-positive-normalized-short-float + least-positive-normalized-single-float + least-positive-short-float + least-positive-single-float + length + let + let* + lisp + lisp-implementation-type + lisp-implementation-version + list + list* + list-all-packages + listen + list-length + listp + load + load-logical-pathname-translations + load-time-value + locally + log + logand + logandc1 + logandc2 + logbitp + logcount + logeqv + logical-pathname + logical-pathname-translations + logior + lognand + lognor + lognot + logorc1 + logorc2 + logtest + logxor + long-float + long-float-epsilon + long-float-negative-epsilon + long-site-name + loop + loop-finish + lower-case-p + machine-instance + machine-type + machine-version + macroexpand + macroexpand-1 + macroexpand-l + macro-function + macrolet + make-array + make-array + make-broadcast-stream + make-char + make-concatenated-stream + make-condition + make-dispatch-macro-character + make-echo-stream + make-hash-table + make-instance + make-instances-obsolete + make-list + make-load-form + make-load-form-saving-slots + make-method + make-package + make-pathname + make-random-state + make-sequence + make-string + make-string-input-stream + make-string-output-stream + make-symbol + make-synonym-stream + make-two-way-stream + makunbound + map + mapc + mapcan + mapcar + mapcon + maphash + map-into + mapl + maplist + mask-field + max + member + member-if + member-if-not + merge + merge-pathname + merge-pathnames + method + method-combination + method-combination-error + method-qualifiers + min + minusp + mismatch + mod + most-negative-double-float + most-negative-fixnum + most-negative-long-float + most-negative-short-float + most-negative-single-float + most-positive-double-float + most-positive-fixnum + most-positive-long-float + most-positive-short-float + most-positive-single-float + muffle-warning + multiple-value-bind + multiple-value-call + multiple-value-list + multiple-value-prog1 + multiple-value-seteq + multiple-value-setq + multiple-values-limit + name-char + namestring + nbutlast + nconc + next-method-p + nil + nintersection + ninth + no-applicable-method + no-next-method + not + notany + notevery + notinline + nreconc + nreverse + nset-difference + nset-exclusive-or + nstring + nstring-capitalize + nstring-downcase + nstring-upcase + nsublis + nsubst + nsubst-if + nsubst-if-not + nsubstitute + nsubstitute-if + nsubstitute-if-not + nth + nthcdr + nth-value + null + number + numberp + numerator + nunion + oddp + open + open-stream-p + optimize + or + otherwise + output-stream-p + package + package-error + package-error-package + package-name + package-nicknames + packagep + package-shadowing-symbols + package-used-by-list + package-use-list + pairlis + parse-error + parse-integer + parse-namestring + pathname + pathname-device + pathname-directory + pathname-host + pathname-match-p + pathname-name + pathnamep + pathname-type + pathname-version + peek-char + phase + pi + plusp + pop + position + position-if + position-if-not + pprint + pprint-dispatch + pprint-exit-if-list-exhausted + pprint-fill + pprint-indent + pprint-linear + pprint-logical-block + pprint-newline + pprint-pop + pprint-tab + pprint-tabular + prin1 + prin1-to-string + princ + princ-to-string + print + print-not-readable + print-not-readable-object + print-object + print-unreadable-object + probe-file + proclaim + prog + prog* + prog1 + prog2 + progn + program-error + progv + provide + psetf + psetq + push + pushnew + putprop + quote + random + random-state + random-state-p + rassoc + rassoc-if + rassoc-if-not + ratio + rational + rationalize + rationalp + read + read-byte + read-char + read-char-no-hang + read-delimited-list + reader-error + read-eval-print + read-from-string + read-line + read-preserving-whitespace + read-sequence + readtable + readtable-case + readtablep + real + realp + realpart + reduce + reinitialize-instance + rem + remf + remhash + remove + remove-duplicates + remove-if + remove-if-not + remove-method + remprop + rename-file + rename-package + replace + require + rest + restart + restart-bind + restart-case + restart-name + return + return-from + revappend + reverse + room + rotatef + round + row-major-aref + rplaca + rplacd + safety + satisfies + sbit + scale-float + schar + search + second + sequence + serious-condition + set + set-char-bit + set-difference + set-dispatch-macro-character + set-exclusive-or + setf + set-macro-character + set-pprint-dispatch + setq + set-syntax-from-char + seventh + shadow + shadowing-import + shared-initialize + shiftf + short-float + short-float-epsilon + short-float-negative-epsilon + short-site-name + signal + signed-byte + signum + simle-condition + simple-array + simple-base-string + simple-bit-vector + simple-bit-vector-p + simple-condition-format-arguments + simple-condition-format-control + simple-error + simple-string + simple-string-p + simple-type-error + simple-vector + simple-vector-p + simple-warning + sin + single-flaot-epsilon + single-float + single-float-epsilon + single-float-negative-epsilon + sinh + sixth + sleep + slot-boundp + slot-exists-p + slot-makunbound + slot-missing + slot-unbound + slot-value + software-type + software-version + some + sort + space + special + special-form-p + special-operator-p + speed + sqrt + stable-sort + standard + standard-char + standard-char-p + standard-class + standard-generic-function + standard-method + standard-object + step + storage-condition + store-value + stream + stream-element-type + stream-error + stream-error-stream + stream-external-format + streamp + streamup + string + string< + string<= + string= + string> + string>= + string/= + string-capitalize + string-char + string-char-p + string-downcase + string-equal + string-greaterp + string-left-trim + string-lessp + string-not-equal + string-not-greaterp + string-not-lessp + stringp + string-right-strim + string-right-trim + string-stream + string-trim + string-upcase + structure + structure-class + structure-object + style-warning + sublim + sublis + subseq + subsetp + subst + subst-if + subst-if-not + substitute + substitute-if + substitute-if-not + subtypep + svref + sxhash + symbol + symbol-function + symbol-macrolet + symbol-name + symbolp + symbol-package + symbol-plist + symbol-value + synonym-stream + synonym-stream-symbol + sys + system + t + tagbody + tailp + tan + tanh + tenth + terpri + the + third + throw + time + trace + translate-logical-pathname + translate-pathname + tree-equal + truename + truncase + truncate + two-way-stream + two-way-stream-input-stream + two-way-stream-output-stream + type + typecase + type-error + type-error-datum + type-error-expected-type + type-of + typep + unbound-slot + unbound-slot-instance + unbound-variable + undefined-function + unexport + unintern + union + unless + unread + unread-char + unsigned-byte + untrace + unuse-package + unwind-protect + update-instance-for-different-class + update-instance-for-redefined-class + upgraded-array-element-type + upgraded-complex-part-type + upper-case-p + use-package + user + user-homedir-pathname + use-value + values + values-list + vector + vectorp + vector-pop + vector-push + vector-push-extend + warn + warning + when + wild-pathname-p + with-accessors + with-compilation-unit + with-condition-restarts + with-hash-table-iterator + with-input-from-string + with-open-file + with-open-stream + with-output-to-string + with-package-iterator + with-simple-restart + with-slots + with-standard-io-syntax + write + write-byte + write-char + write-line + write-sequence + write-string + write-to-string + yes-or-no-p + y-or-n-p + zerop + + + + :abort + :adjustable + :append + :array + :base + :case + :circle + :conc-name + :constructor + :copier + :count + :create + :default + :defaults + :device + :direction + :directory + :displaced-index-offset + :displaced-to + :element-type + :end1 + :end2 + :end + :error + :escape + :external + :from-end + :gensym + :host + :if-does-not-exist:pretty + :if-exists:print + :include:print-function + :index + :inherited + :initial-contents + :initial-element + :initial-offset + :initial-value + :input + :internal:size + :io + :junk-allowed + :key + :length + :level + :named + :name + :new-version + :nicknames + :output-file + :output + :overwrite + :predicate + :preserve-whitespace + :probe + :radix + :read-only + :rehash-size + :rehash-threshold + :rename-and-delete + :rename + :start1 + :start2 + :start + :stream + :supersede + :test + :test-not + :type + :use + :verbose + :version + + + *applyhook* + *break-on-signals* + *break-on-signals* + *break-on-warnings* + *compile-file-pathname* + *compile-file-pathname* + *compile-file-truename* + *compile-file-truename* + *compile-print* + *compile-verbose* + *compile-verbose* + *debugger-hook* + *debug-io* + *default-pathname-defaults* + *error-output* + *evalhook* + *features* + *gensym-counter* + *load-pathname* + *load-print* + *load-truename* + *load-verbose* + *macroexpand-hook* + *modules* + *package* + *print-array* + *print-base* + *print-case* + *print-circle* + *print-escape* + *print-gensym* + *print-length* + *print-level* + *print-lines* + *print-miser-width* + *print-miser-width* + *print-pprint-dispatch* + *print-pprint-dispatch* + *print-pretty* + *print-radix* + *print-readably* + *print-right-margin* + *print-right-margin* + *query-io* + *random-state* + *read-base* + *read-default-float-format* + *read-eval* + *read-suppress* + *readtable* + *standard-input* + *standard-output* + *terminal-io* + *trace-output* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/component-pascal.xml b/kate/data/component-pascal.xml new file mode 100644 index 000000000..09e70011b --- /dev/null +++ b/kate/data/component-pascal.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + BEGIN + BY + CASE + CLOSE + CONST + DO + ELSE + ELSIF + END + FOR + IF + IMPORT + LOOP + MODULE + NEW + OF + OUT + PROCEDURE + REPEAT + THEN + TO + TYPE + UNTIL + VAR + WHILE + WITH + + + ASSERT + EXIT + HALT + RETURN + + + ANYPTR + ANYREC + ARRAY + BOOLEAN + SHORTCHAR + CHAR + BYTE + SHORTINT + INTEGER + LONGINT + POINTER + RECORD + SHORTREAL + REAL + SET + + + ABSTRACT + EMPTY + EXTENSIBLE + LIMITED + + + ABS + ASH + BITS + CAP + CHR + DEC + ENTIER + EXCL + INC + INCL + LEN + LONG + MAX + MIN + ODD + ORD + SHORT + SIZE + + + FALSE + INF + NIL + TRUE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cpp.xml b/kate/data/cpp.xml new file mode 100644 index 000000000..790c0d8f9 --- /dev/null +++ b/kate/data/cpp.xml @@ -0,0 +1,273 @@ + + + + + + asm + break + case + catch + class + const_cast + continue + default + delete + do + dynamic_cast + else + enum + explicit + export + extern + false + friend + for + goto + if + inline + namespace + new + operator + private + protected + public + qobject_cast + reinterpret_cast + return + sizeof + static_cast + struct + switch + template + this + throw + true + try + typedef + typeid + type_info + typename + union + using + virtual + while + + and + and_eq + bad_cast + bad_typeid + bitand + bitor + compl + not + not_eq + or + or_eq + xor + xor_eq + except + finally + xalloc + + + K_DCOP + SLOT + SIGNAL + Q_CLASSINFO + Q_ENUMS + Q_EXPORT + Q_OBJECT + Q_OVERRIDE + Q_PROPERTY + Q_SETS + Q_SIGNALS + Q_SLOTS + Q_FOREACH + Q_DECLARE_FLAGS + Q_INIT_RESOURCE + Q_CLEANUP_RESOURCE + Q_GLOBAL_STATIC + Q_GLOBAL_STATIC_WITH_ARGS + Q_DECLARE_INTERFACE + Q_DECLARE_TYPEINFO + Q_DECLARE_SHARED + Q_DECLARE_FLAGS + Q_DECLARE_OPERATORS_FOR_FLAGS + Q_FOREVER + Q_DECLARE_PRIVATE + Q_DECLARE_PUBLIC + Q_D + Q_Q + Q_DISABLE_COPY + Q_INTERFACES + Q_FLAGS + Q_SCRIPTABLE + Q_INVOKABLE + Q_GADGET + Q_ARG + Q_RETURN_ARG + Q_ASSERT + Q_ASSERT_X + Q_PRIVATE_SLOT + Q_DECLARE_METATYPE + Q_NOREPLY + TRUE + FALSE + connect + disconnect + emit + signals + slots + foreach + forever + + + auto + bool + char + const + double + float + int + long + mutable + register + short + signed + static + unsigned + void + volatile + uchar + uint + int8_t + int16_t + int32_t + int64_t + uint8_t + uint16_t + uint32_t + uint64_t + wchar_t + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cs.xml b/kate/data/cs.xml new file mode 100644 index 000000000..3393aa204 --- /dev/null +++ b/kate/data/cs.xml @@ -0,0 +1,161 @@ + + + + + abstract + as + base + break + case + catch + class + checked + continue + default + delegate + do + else + enum + event + explicit + extern + false + for + foreach + finally + fixed + goto + if + implicit + in + interface + internal + is + lock + namespace + new + null + operator + out + override + params + private + protected + public + readonly + ref + return + sealed + sizeof + stackalloc + static + struct + switch + this + throw + true + try + typeof + unchecked + unsafe + using + virtual + while + #if + #else + #elif + #endif + #define + #undef + #warning + #error + #line + + + bool + byte + char + const + decimal + double + float + int + long + object + uint + ushort + ulong + sbyte + short + string + void + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/css.xml b/kate/data/css.xml new file mode 100644 index 000000000..0e9188382 --- /dev/null +++ b/kate/data/css.xml @@ -0,0 +1,624 @@ + + + + + + + + azimuth + background + background-attachment + background-color + background-image + background-position + background-repeat + border + border-bottom + border-bottom-color + border-bottom-style + border-bottom-width + border-collapse + border-color + border-left + border-left-color + border-left-style + border-left-width + border-right + border-right-color + border-right-style + border-right-width + border-spacing + border-style + border-top + border-top-color + border-top-style + border-top-width + border-width + bottom + caption-side + clear + clip + color + content + counter-increment + counter-reset + cue + cue-after + cue-before + cursor + direction + display + elevation + empty-cells + float + font + font-family + font-size + font-size-adjust + font-stretch + font-style + font-variant + font-weight + height + left + letter-spacing + line-height + list-style + list-style-image + list-style-keyword + list-style-position + list-style-type + margin + margin-bottom + margin-left + margin-right + margin-top + marker-offset + max-height + max-width + min-height + min-width + orphans + outline + outline-color + outline-style + outline-width + overflow + padding + padding-bottom + padding-left + padding-right + padding-top + page + page-break-after + page-break-before + page-break-inside + pause + pause-after + pause-before + pitch + pitch-range + play-during + position + quotes + richness + right + size + speak + speak-header + speak-numeral + speak-punctuation + speech-rate + stress + table-layout + text-align + text-decoration + text-decoration-color + text-indent + text-shadow + text-transform + top + unicode-bidi + vertical-align + visibility + voice-family + volume + white-space + widows + width + word-spacing + z-index + + + box-sizing + opacity + text-shadow + + + konq_bgpos_x + konq_bgpos_y + + + font-family + font-size + font-stretch + font-style + font-variant + font-weight + unicode-range + units-per-em + src + panose-1 + stemv + stemh + slope + cap-height + x-height + ascent + descent + widths + bbox + definition-src + baseline + centerline + mathline + topline + + + + inherit + none + hidden + dotted + dashed + solid + double + groove + ridge + inset + outset + xx-small + x-small + small + medium + large + x-large + xx-large + smaller + larger + italic + oblique + small-caps + normal + bold + bolder + lighter + light + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + transparent + repeat + repeat-x + repeat-y + no-repeat + baseline + sub + super + top + text-top + middle + bottom + text-bottom + left + right + center + justify + konq-center + disc + circle + square + box + decimal + decimal-leading-zero + lower-roman + upper-roman + lower-greek + lower-alpha + lower-latin + upper-alpha + upper-latin + hebrew + armenian + georgian + cjk-ideographic + hiragana + katakana + hiragana-iroha + katakana-iroha + inline + inline-block + block + list-item + run-in + compact + marker + table + inline-table + table-row-group + table-header-group + table-footer-group + table-row + table-column-group + table-column + table-cell + table-caption + auto + crosshair + default + pointer + move + e-resize + ne-resize + nw-resize + n-resize + se-resize + sw-resize + s-resize + w-resize + text + wait + help + above + absolute + always + avoid + below + bidi-override + blink + both + capitalize + caption + close-quote + collapse + condensed + crop + cross + embed + expanded + extra-condensed + extra-expanded + fixed + hand + hide + higher + icon + inside + invert + landscape + level + line-through + loud + lower + lowercase + ltr + menu + message-box + mix + narrower + no-close-quote + no-open-quote + nowrap + open-quote + outside + overline + portrait + pre + pre-line + pre-wrap + relative + rtl + scroll + semi-condensed + semi-expanded + separate + show + small-caption + static + static-position + status-bar + thick + thin + ultra-condensed + ultra-expanded + underline + uppercase + visible + wider + break + serif + sans-serif + cursive + fantasy + monospace + border-box + content-box + + + + + aqua + black + blue + fuchsia + gray + green + lime + maroon + navy + olive + purple + red + silver + teal + white + yellow + ActiveBorder + ActiveCaption + AppWorkspace + Background + ButtonFace + ButtonHighlight + ButtonShadow + ButtonText + CaptionText + GrayText + Highlight + HighlightText + InactiveBorder + InactiveCaption + InactiveCaptionText + InfoBackground + InfoText + Menu + MenuText + Scrollbar + ThreeDDarkShadow + ThreeDFace + ThreeDHighlight + ThreeDLightShadow + ThreeDShadow + Window + WindowFrame + WindowText + + + + url + attr + rect + rgb + counter + counters + + + local + format + + + + all + aural + braille + embossed + handheld + print + projection + screen + tty + tv + + + + hover + link + visited + active + focus + first-child + last-child + only-child + first-of-type + last-of-type + only-of-type + first-letter + first-line + before + after + selection + root + empty + target + enabled + disabled + checked + indeterminate + nth-child + nth-last-child + nth-of-type + nth-last-of-type + not + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/cue.xml b/kate/data/cue.xml new file mode 100644 index 000000000..6044aae7b --- /dev/null +++ b/kate/data/cue.xml @@ -0,0 +1,74 @@ + + + + + + CATALOG + CDTEXTFILE + FILE + FLAGS + INDEX + ISRC + PERFORMER + PREGAP + POSTGAP + REM + SONGWRITER + TITLE + TRACK + + + AIFF + WAVE + MP3 + BINARY + MOTOTOLA + + + AUDIO + CDG + CDI + MODE1 + MODE2 + RAW + + + 4CH + DCP + PRE + SCMS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/d.xml b/kate/data/d.xml new file mode 100644 index 000000000..e53a3174c --- /dev/null +++ b/kate/data/d.xml @@ -0,0 +1,348 @@ + + + + + + + + abstract + alias + align + asm + auto + + body + break + + case + cast + catch + class + const + continue + + default + delegate + delete + deprecated + do + + else + enum + export + + false + final + finally + for + foreach + function + + goto + + if + in + inout + interface + invariant + is + + mixin + + new + null + + out + override + + package + private + protected + public + + return + + static + struct + super + switch + synchronized + + template + this + throw + true + try + typedef + typeof + + union + + volatile + + while + with + + + module + import + + + void + bit + byte + ubyte + short + ushort + int + uint + long + ulong + cent + ucent + float + double + real + ireal + ifloat + idouble + creal + cfloat + cdouble + char + wchar + dchar + + + printf + writef + + + + extern + + + C + D + Windows + Pascal + + + + debug + + + assert + + + + pragma + + + msg + + + + version + + + DigitalMars + X86 + AMD64 + Windows + Win32 + Win64 + linux + LittleEndian + BigEndian + D_InlineAsm + none + + + + unittest + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/debianchangelog.xml b/kate/data/debianchangelog.xml new file mode 100644 index 000000000..b752f229c --- /dev/null +++ b/kate/data/debianchangelog.xml @@ -0,0 +1,60 @@ + + + + + + urgency + + + + stable + testing + frozen + unstable + experimental + + + + low + medium + high + emergency + bug + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/debiancontrol.xml b/kate/data/debiancontrol.xml new file mode 100644 index 000000000..76b761863 --- /dev/null +++ b/kate/data/debiancontrol.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/desktop.xml b/kate/data/desktop.xml new file mode 100644 index 000000000..c91e6273f --- /dev/null +++ b/kate/data/desktop.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/diff.xml b/kate/data/diff.xml new file mode 100644 index 000000000..e9d2ccf05 --- /dev/null +++ b/kate/data/diff.xml @@ -0,0 +1,113 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/doxygen.xml b/kate/data/doxygen.xml new file mode 100644 index 000000000..a464c98d0 --- /dev/null +++ b/kate/data/doxygen.xml @@ -0,0 +1,447 @@ + + + + + + + + \arg + \attention + \author + \callgraph + \code + \dot + \else + \endcode + \enddot + \endhtmlonly + \endif + \endlatexonly + \endlink + \endmanonly + \endverbatim + \endxmlonly + \f[ + \f] + \f$ + \hideinitializer + \htmlonly + \interface + \internal + \invariant + \~ + \@ + \$ + \\ + \# + \latexonly + \li + \manonly + \n + \nosubgrouping + \note + \only + \par + \post + \pre + \remarks + \return + \returns + \sa + \see + \showinitializer + \since + \test + \todo + \verbatim + \warning + \xmlonly + + @arg + @attention + @author + @callgraph + @code + @dot + @else + @endcode + @enddot + @endhtmlonly + @endif + @endlatexonly + @endlink + @endmanonly + @endverbatim + @endxmlonly + @f[ + @f] + @f$ + @hideinitializer + @htmlonly + @interface + @internal + @invariant + @~ + @@ + @$ + @\ + @# + @latexonly + @li + @manonly + @n + @nosubgrouping + @note + @only + @par + @post + @pre + @remarks + @return + @returns + @sa + @see + @showinitializer + @since + @test + @todo + @verbatim + @warning + @xmlonly + + + + \addtogroup + \a + \anchor + \b + \c + \class + \copydoc + \def + \dontinclude + \dotfile + \e + \elseif + \em + \enum + \example + \exception + \exceptions + \file + \htmlinclude + \if + \ifnot + \include + \link + \namespace + \p + \package + \param + \ref + \relatesalso + \relates + \retval + \throw + \throws + \verbinclude + \version + \xrefitem + + @addtogroup + @a + @anchor + @b + @c + @class + @copydoc + @def + @dontinclude + @dotfile + @e + @elseif + @em + @enum + @example + @exception + @exceptions + @file + @htmlinclude + @if + @ifnot + @include + @link + @namespace + @p + @package + @param + @ref + @relatesalso + @relates + @retval + @throw + @throws + @verbinclude + @version + @xrefitem + + + \image + + @image + + + \defgroup + \page + \paragraph + \section + \struct + \subsection + \subsubsection + \union + \weakgroup + + @defgroup + @page + @paragraph + @section + @struct + @subsection + @subsubsection + @union + @weakgroup + + + \addindex + \brief + \bug + \date + \deprecated + \fn + \ingroup + \line + \mainpage + \name + \overload + \short + \skip + \skipline + \typedef + \until + \var + + @addindex + @brief + @bug + @date + @deprecated + @fn + @ingroup + @line + @mainpage + @name + @overload + @short + @skip + @skipline + @typedef + @until + @var + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/e.xml b/kate/data/e.xml new file mode 100644 index 000000000..a1fa75f6d --- /dev/null +++ b/kate/data/e.xml @@ -0,0 +1,258 @@ + + + + + + FALSE + MAX_INT + MIN_INT + NULL + TRUE + UNDEF + bit + bits + body + bool + byte + byte_array + continue + copy + default + external_pointer + files + file + form + global + index + init + int + it + list + load + long + me + method + module + ntv + of + pat + print + result + source_ref + string + symtab + sys + test + uint + untyped + vec + + + run + init + pre_generate + dut_error + pack + unpack + post_generate + pre_generate + set_config + hex + stop_run + append + size + delete + is_empty + deep_compare + deep_compare_physical + clear + pop0 + setup + crc_32 + + + chars + define + extend + event + ECHO + DOECHO + import + initialize + non_terminal + struct + unit + script + testgroup + type + + + C + add + also + and + as + as_a + break + code + compute + computed + delayed + do + else + each + emit + empty + end + exit + finish + for + from + if + in + is + like + log + new + no + not + only + or + out + read + repeat + return + reverse + routine + step + then + to + traceable + untraceable + var + when + while + with + write + xor + + + before + by + choose + gen + keep + keeping + matches + next + select + sequence + soft + using + + + address + cover + error + events + event + length + kind + ranges + range + sample + text + value + item + transition + illegal + + + always + all + basic + call + cycles + cycle + clock + change + check + expect + fall + first + forever + idle + initial + negedge + others + on + posedge + rise + start + that + time + task + until + verilog + vhdl + wait + within + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/eiffel.xml b/kate/data/eiffel.xml new file mode 100644 index 000000000..9998fd824 --- /dev/null +++ b/kate/data/eiffel.xml @@ -0,0 +1,125 @@ + + + + + + + agent + alias + all + and + as + assign + class + convert + create + creation + debug + deferred + do + else + elseif + end + expanded + export + external + feature + from + frozen + if + implies + indexing + infix + inherit + inspect + is + like + local + loop + not + obsolete + old + once + or + prefix + pure + redefine + reference + rename + rescue + retry + separate + then + undefine + + + + Current + False + Precursor + Result + True + TUPLE + + + + check + ensure + require + variant + invariant + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/email.xml b/kate/data/email.xml new file mode 100644 index 000000000..a3ef294f2 --- /dev/null +++ b/kate/data/email.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/euphoria.xml b/kate/data/euphoria.xml new file mode 100644 index 000000000..a1ca19994 --- /dev/null +++ b/kate/data/euphoria.xml @@ -0,0 +1,376 @@ + + + + + + + + + + abort + allocate + allocate_string + allow_break + and + and_bits + append + arccos + arcsin + arctan + atom_to_float32 + atom_to_float64 + as + begin + bits_to_int + bytes_to_int + c_func + c_proc + call + call_back + call_func + call_proc + check_break + chdir + clear_screen + close + command_line + compare + cos + crash_file + crash_message + current_dir + custom_sort + date + define_c_func + define_c_proc + define_c_var + dir + display_text_image + do + else + elsif + end + equal + exit + find + float32_to_atom + float64_to_atom + floor + flush + for + free + free_console + function + get_bytes + get_key + get_mouse + get_position + get_screen_char + getc + getenv + gets + if + include + int_to_bits + int_to_bytes + length + lock_file + log + lower + machine_func + machine_proc + match + mem_copy + mem_set + mouse_events + mouse_pointer + not + not_bits + of + open + open_dll + or + or_bits + peek + peek4 + peek4s + peek4u + platform + poke + poke4 + position + power + prepend + print + printf + procedure + profile + prompt_number + prompt_string + put_screen_char + puts + rand + read_bitmap + register_block + remainder + repeat + return + reverse + routine_id + save_bitmap + save_text_image + scroll + seek + set_rand + sin + sleep + sort + sprint + sprintf + sqrt + system + system_exec + tan + text_color + then + time + to + trace + type + unlock_file + unregister_block + upper + value + video_config + wait_key + walk_dir + where + while + wildcard_file + wildcard_match + with + without + wrap + xor + xor_bits + ? + + + + atom + constant + global + integer + object + sequence + type + + + + PI + GET_SUCCESS + + + + addto + adjustment + alignment + appendto + append_page + arrow + aspect_frame + button + calendar + cell_renderer_text + cell_renderer_toggle + check + checkbutton + check_menu_item + choice + combo + connect + drawingarea + draw_arc + draw_image + draw_line + draw_polygon + draw_point + draw_rectangle + end_submenu + entry + euget + event_box + flatten + font + frame + get + getImage + getSize + g_list + g_list_to_sequence + deallocate_strings + draw_line + hbox + hbuttonbox + hpaned + hscrollbar + hseparator + hscale + idle_add + image + image_menu_item + init + label + limit + list_store + list_view + list_view_column + main + mark_day + menu + menubar + menu_item + mouse_button + new_gc + new_group + new_menu_group + notebook + option + option_menu + pack + path + pop + progress_bar + push + quit + radio + radiobutton + radio_menu_item + rc_parse + run + separator_menu_item + set + set_submenu + str + scrolled_window + seq_to_str + setfg + setProperty + show + spinbutton + statusbar + table + textbox + timer + togglebutton + toolbar + tooltip + tree_store + tree_view + tree_view_column + vbox + vbuttonbox + vpaned + vscale + vscrollbar + vseparator + when + window + NULL + TRUE + FALSE + color_selection + file_selection + font_selection_dialog + Error + Info + Question + Warn + YesNo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/ferite.xml b/kate/data/ferite.xml new file mode 100644 index 000000000..7d1548275 --- /dev/null +++ b/kate/data/ferite.xml @@ -0,0 +1,117 @@ + + + + + + break + case + continue + else + for + if + do + function + namespace + while + class + new + uses + global + return + self + super + null + iferr + fix + + + number + void + string + array + object + final + static + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/fgl-4gl.xml b/kate/data/fgl-4gl.xml new file mode 100644 index 000000000..2acbe8ff2 --- /dev/null +++ b/kate/data/fgl-4gl.xml @@ -0,0 +1,363 @@ + + + + + + at + by + go + if + in + is + no + of + on + or + to + up + + add + ALL + and + ANY + avg + day + end + ESC + for + key + let + log + max + mdy + min + not + put + red + row + run + set + sum + top + + blue + BOLD + call + case + cyan + desc + DROP + else + exit + file + form + FREE + from + goto + help + HIDE + HOLD + HOUR + into + last + left + like + line + load + LOCK + main + menu + MODE + name + NEED + next + null + open + page + PIPE + quit + READ + rows + show + skip + sort + STEP + STOP + TEMP + text + then + thru + true + user + WAIT + when + with + WORK + WRAP + year + + after + alter + ascii + BEGIN + blink + clear + close + count + DEFER + DIRTY + error + every + false + fetch + field + first + flush + green + GROUP + index + input + label + lines + month + order + outer + pause + print + right + share + sleep + space + start + TABLE + today + union + UNITS + using + where + WHILE + white + + ACCEPT + before + border + bottom + column + commit + create + cursor + define + delete + enable + ESCAPE + exists + finish + format + HAVING + header + insert + length + locate + margin + MINUTE + MODIFY + normal + option + output + PAGENO + prompt + record + report + return + revoke + SCREEN + scroll + SECOND + select + spaces + status + UNIQUE + UNLOAD + update + values + window + yellow + + between + clipped + cluster + columns + command + comment + connect + CURRENT + declare + display + execute + foreach + globals + infield + MAGENTA + matches + message + options + prepare + printer + program + reverse + trailer + upshift + waiting + without + + ABSOLUTE + continue + database + defaults + DISTINCT + EXTERNAL + function + INT_FLAG + NOTFOUND + previous + ROLLBACK + whenever + wordwrap + + attribute + committed + construct + delimiter + downshift + exclusive + INTERRUPT + ISOLATION + otherwise + quit_flag + returning + + attributes + CONSTRAINT + initialize + statistics + + fgl_lastkey + formhandler + + fgl_lastkey() + + + + + char + date + array + float + money + serial + DECIMAL + integer + NUMERIC + VARCHAR + DATETIME + FRACTION + INTERVAL + smallint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/fgl-per.xml b/kate/data/fgl-per.xml new file mode 100644 index 000000000..9b3461ad8 --- /dev/null +++ b/kate/data/fgl-per.xml @@ -0,0 +1,172 @@ + + + + + + by + to + + end + not + red + + blue + cyan + keys + like + null + size + type + + black + color + green + input + today + white + + format + record + screen + tables + yellow + + default + display + include + magenta + noentry + picture + reverse + through + UPSHIFT + without + + autonext + comments + COMPRESS + database + formonly + noupdate + required + WORDWRAP + + character + downshift + invisible + underline + + attributes + delimiters + + instructions + + + char + date + array + float + money + serial + DECIMAL + integer + NUMERIC + VARCHAR + DATETIME + FRACTION + INTERVAL + smallint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/fortran.xml b/kate/data/fortran.xml new file mode 100644 index 000000000..948267fc9 --- /dev/null +++ b/kate/data/fortran.xml @@ -0,0 +1,569 @@ + + + + + + + + + + + allocate + break + call + case + common + contains + continue + cycle + deallocate + default + do + forall + where + elsewhere + elseif + else + equivalence + exit + external + for + go + goto + if + implicit + include + interface + intrinsic + namelist + none + nullify + operator + assignment + pause + procedure + pure + elemental + record + recursive + result + return + select + selectcase + stop + then + to + use + only + entry + while + + + access + backspace + close + inquire + open + print + read + rewind + write + format + + + + unit + end + err + fmt + iostat + status + advance + size + eor + + + + unit + iostat + err + file + status + access + form + recl + blank + position + action + delim + pad + + + + unit + iostat + err + file + exist + opened + number + named + name + access + sequential + direct + form + formatted + unformatted + recl + nextrec + blank + position + action + read + write + readwrite + delim + pad + + + double + precision + parameter + save + pointer + public + private + target + allocatable + optional + sequence + + + + + + + + abs + cabs + dabs + iabs + aimag + aint + dint + anint + dnint + ceiling + cmplx + dcmplx + dimag + floor + nint + idnint + int + idint + ifix + real + float + sngl + dble + dreal + aprime + dconjg + dfloat + ddmim + rand + + modulo + conjg + dprod + dim + ddim + idim + max + amax0 + amax1 + max0 + max1 + dmax1 + min + amin0 + amin1 + min0 + min1 + dmin1 + mod + amod + dmod + sign + dsign + isign + + acos + dacos + asin + dasin + atan + datan + atan2 + datan2 + cos + ccos + dcos + cosh + dcosh + exp + cexp + dexp + log + alog + dlog + clog + log10 + alog10 + dlog10 + sin + csin + dsin + sinh + dsinh + sqrt + csqrt + dsqrt + tan + dtan + tanh + dtanh + + + achar + char + iachar + ichar + + lge + lgt + lle + llt + + adjustl + adjustr + index + len_trim + scan + verify + + logical + + exponent + fraction + nearest + rrspacing + scale + set_exponent + spacing + + btest + iand + ibclr + ibits + ibset + ieor + ior + ishft + ishftc + not + + mvbits + + merge + + + + + + associated + present + kind + + len + + digits + epsilon + huge + maxexponent + minexponent + precision + radix + range + tiny + + bit_size + + allocated + lbound + ubound + shape + size + + + + + + repeat + trim + + selected_int_kind + selected_real_kind + + transfer + + dot_product + matmul + + all + any + count + maxval + minval + product + sum + + pack + unpack + + reshape + + spread + + cshift + eoshift + + transpose + + maxloc + minloc + + + + + + date_and_time + system_clock + + random_number + random_seed + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/fstab.xml b/kate/data/fstab.xml new file mode 100644 index 000000000..c2e1b21c6 --- /dev/null +++ b/kate/data/fstab.xml @@ -0,0 +1,96 @@ + + + + + + + ext2 + ext3 + fat + vfat + reiser + proc + none + sysfs + ntfs + umsdos + swap + minix + iso9660 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/gdl.xml b/kate/data/gdl.xml new file mode 100644 index 000000000..a41af14c4 --- /dev/null +++ b/kate/data/gdl.xml @@ -0,0 +1,313 @@ + + + + + + white + blue + red + green + yellow + magenta + cyan + darkgrey + darkgray + darkblue + darkred + darkgreen + darkyellow + darkmagenta + darkcyan + gold + lightgrey + lightgray + lightblue + lightred + lightgreen + lightyellow + lightmagenta + lightcyan + lilac + turquoise + aquamarine + khaki + purple + yellowgreen + pink + orange + orchid + black + + + box + triangle + circle + ellipse + hexagon + rhomb + rhomboid + trapeze + uptrapeze + trapezoid + uptrapezoid + lparallelogram + rparallelogram + + + unfolded + folded + boxed + clustered + wrapped + exclusive + white + + + normal + tree + forcedir + dfs + minbackward + maxdepth + maxdepthslow + mindepth + mindepthslow + minindegree + minoutdegree + maxindegree + maxoutdegree + maxdegree + mindegree + + + attraction + repulsion + randomfactor + randomimpulse + randomrounds + tempscheme + temptreshold + tempmin + tempmax + + + no + polar + circular + polcircular + orthogonal + + + toptobottom + bottomtotop + lefttoright + righttoleft + top_to_bottom + bottom_to_top + left_to_right + right_to_left + + + solid + continuous + dashed + dotted + double + triple + invisible + + + pfish + cfish + fpfish + fcfish + dpfish + dcfish + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/generate-php.pl b/kate/data/generate-php.pl new file mode 100644 index 000000000..c6bb3a50c --- /dev/null +++ b/kate/data/generate-php.pl @@ -0,0 +1,56 @@ +# This perl script read stdin and write on stdout. It shall be an XML language file. +# +# * If the name of the language is 'HTML', then it creates the language 'PHP (HTML)' +# which shall be used for PHP hl. +# +# * If the name of the language is something else (say '*'), it creates the language '*/PHP'. +# This new language is the same as the old one, but is able to detect PHP everywhere. +# +# This script will correctly set extensions & mimetype, and will replace +# by +# +# Generated languages need a language named 'PHP/PHP', which shall take care of PHP hl itself +# and which will be called every time something like +# License: LGPL + +my $file = ""; + +while (<>) +{ + $file .= $_; +} + +$warning = "\n\n\n"; + +$file =~ s/(?=]+name="HTML"/) +{ + $root = 1; +} + +if ($root == 1) +{ + $file =~ s/]+)name="[^"]*"/]+)section="[^"]*"/]+)extensions="[^"]*"/]+)mimetype="[^"]*"/]+)name="([^"]*)"/
" +echo " " +cat $schemas | $list_keywords | grep "objectclass" | grep -v '^#' | sed -e "s/'//g" | sort -u | awk '{print " "$2""}' +echo " " + diff --git a/kate/data/literate-haskell.xml b/kate/data/literate-haskell.xml new file mode 100644 index 000000000..5ed0f8893 --- /dev/null +++ b/kate/data/literate-haskell.xml @@ -0,0 +1,386 @@ + + + + + + case + class + data + deriving + do + else + if + in + infixl + infixr + instance + let + module + of + primitive + then + type + where + + + quot + rem + div + mod + elem + notElem + seq + + + + + FilePath + IOError + abs + acos + acosh + all + and + any + appendFile + approxRational + asTypeOf + asin + asinh + atan + atan2 + atanh + basicIORun + break + catch + ceiling + chr + compare + concat + concatMap + const + cos + cosh + curry + cycle + decodeFloat + denominator + digitToInt + div + divMod + drop + dropWhile + either + elem + encodeFloat + enumFrom + enumFromThen + enumFromThenTo + enumFromTo + error + even + exp + exponent + fail + filter + flip + floatDigits + floatRadix + floatRange + floor + fmap + foldl + foldl1 + foldr + foldr1 + fromDouble + fromEnum + fromInt + fromInteger + fromIntegral + fromRational + fst + gcd + getChar + getContents + getLine + head + id + inRange + index + init + intToDigit + interact + ioError + isAlpha + isAlphaNum + isAscii + isControl + isDenormalized + isDigit + isHexDigit + isIEEE + isInfinite + isLower + isNaN + isNegativeZero + isOctDigit + isPrint + isSpace + isUpper + iterate + last + lcm + length + lex + lexDigits + lexLitChar + lines + log + logBase + lookup + map + mapM + mapM_ + max + maxBound + maximum + maybe + min + minBound + minimum + mod + negate + not + notElem + null + numerator + odd + or + ord + otherwise + pi + pred + primExitWith + print + product + properFraction + putChar + putStr + putStrLn + quot + quotRem + range + rangeSize + read + readDec + readFile + readFloat + readHex + readIO + readInt + readList + readLitChar + readLn + readOct + readParen + readSigned + reads + readsPrec + realToFrac + recip + rem + repeat + replicate + return + reverse + round + scaleFloat + scanl + scanl1 + scanr + scanr1 + seq + sequence + sequence_ + show + showChar + showInt + showList + showLitChar + showParen + showSigned + showString + shows + showsPrec + significand + signum + sin + sinh + snd + span + splitAt + sqrt + subtract + succ + sum + tail + take + takeWhile + tan + tanh + threadToIOResult + toEnum + toInt + toInteger + toLower + toRational + toUpper + truncate + uncurry + undefined + unlines + until + unwords + unzip + unzip3 + userError + words + writeFile + zip + zip3 + zipWith + zipWith3 + + + Bool + Char + Double + Either + Float + IO + Integer + Int + Maybe + Ordering + Rational + Ratio + ReadS + ShowS + String + + + + Bounded + Enum + Eq + Floating + Fractional + Functor + Integral + Ix + Monad + Num + Ord + Read + RealFloat + RealFrac + Real + Show + + + EQ + False + GT + Just + LT + Left + Nothing + Right + True + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/logtalk.xml b/kate/data/logtalk.xml new file mode 100644 index 000000000..17e130c8f --- /dev/null +++ b/kate/data/logtalk.xml @@ -0,0 +1,206 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/lpc.xml b/kate/data/lpc.xml new file mode 100644 index 000000000..2b13ef7ff --- /dev/null +++ b/kate/data/lpc.xml @@ -0,0 +1,166 @@ + + + + + + + + + + + + + private + protected + static + public + nomask + varargs + nosave + virtual + + + void + int + status + string + object + array + mapping + closure + symbol + float + mixed + + + break + continue + return + if + else + for + foreach + do + while + switch + case + inherit + default + variables + functions + publish + nolog + + + FIXME + HACK + NOTE + NOTICE + TODO + WARNING + ### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/lua.xml b/kate/data/lua.xml new file mode 100644 index 000000000..5b868aeec --- /dev/null +++ b/kate/data/lua.xml @@ -0,0 +1,237 @@ + + + + + + and + end + local + return + break + for + do + if + nil + then + function + not + until + else + or + while + elseif + in + repeat + + + string.byte + string.char + string.find + string.len + string.lower + string.rep + string.sub + string.upper + string.format + string.gfind + string.gsub + table.concat + table.foreach + table.foreachi + table.getn + table.sort + table.insert + table.remove + table.setn + math.abs + math.sin + math.cos + math.tan + math.asin + math.acos + math.atan + math.atan2 + math.ceil + math.floor + math.mod + math.frexp + math.ldexp + math.squrt + math.min + math.max + math.log + math.log10 + math.exp + math.deg + math.rad + math.random + math.randomseed + io.close + io.flush + io.input + io.lines + io.open + io.output + io.read + io.stderr + io.stdin + io.stdout + io.tmpfile + io.write + os.clock + os.date + os.difftime + os.execute + os.exit + os.getenv + os.remove + os.rename + os.setlocale + os.time + os.tmpname + debug.getinfo + debug.getlocal + debug.setlocal + debug.sethook + debug.gethook + assert + collectgarbage + dofile + error + next + print + rawget + rawset + tonumber + tostring + type + _ALERT + _ERRORMESSAGE + call + copytagmethods + dostring + foreach + foreachi + getglobal + getn + gettagmethod + globals + newtag + setglobal + settag + settagmethod + sort + tag + tinsert + tremove + openfile + closefile + flush + seek + setlocale + execute + remove + rename + tmpname + getenv + date + clock + exit + readfrom + writeto + appendto + read + write + abs + sin + cos + tan + asin + acos + atan + atan2 + ceil + floor + mod + frexp + ldexp + squrt + min + max + log + log10 + exp + deg + rad + random + randomseed + strlen + strsub + strlower + strupper + strchar + strrep + ascii + strbyte + format + strfind + gsub + getinfo + getlocal + setlocal + setcallhook + setlinehook + getglobals + getmetatable + gcinfo + ipairs + loadfile + loadstring + pairs + pcall + require + setglobals + setmetatable + unpack + LUA_PATH + _LOADED + _VERSION + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/m3u.xml b/kate/data/m3u.xml new file mode 100644 index 000000000..dfa18e4e6 --- /dev/null +++ b/kate/data/m3u.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/mab.xml b/kate/data/mab.xml new file mode 100644 index 000000000..338d24070 --- /dev/null +++ b/kate/data/mab.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/makefile.xml b/kate/data/makefile.xml new file mode 100644 index 000000000..7931c5a6a --- /dev/null +++ b/kate/data/makefile.xml @@ -0,0 +1,82 @@ + + + + + + + + include + define + else + endef + endif + ifdef + ifeq + ifndef + ifneq + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/mason.xml b/kate/data/mason.xml new file mode 100644 index 000000000..3fd1b4992 --- /dev/null +++ b/kate/data/mason.xml @@ -0,0 +1,203 @@ + + + + + + sub + bless + caller + cmp + print + echo + die + import + lt + le + local + last + ! + || + eq + ne + use + elsif + my + foreach + wantarray + push + pop + dbmclose + dbmopen + dump + each + ge + gt + split + open + close + eval + chomp + chop + unless + undef + next + unlink + new + and + not + no + ref + redo + require + tied + tie + untie + or + xor + continue + do + else + for + goto + if + return + switch + while + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/matlab.xml b/kate/data/matlab.xml new file mode 100644 index 000000000..b4b6fbc0b --- /dev/null +++ b/kate/data/matlab.xml @@ -0,0 +1,222 @@ + + + + + + + + + + + break + case + catch + continue + else + elseif + end + for + function + global + if + otherwise + persistent + return + switch + try + while + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/mediawiki.xml b/kate/data/mediawiki.xml new file mode 100644 index 000000000..f10fe6586 --- /dev/null +++ b/kate/data/mediawiki.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/mips.xml b/kate/data/mips.xml new file mode 100644 index 000000000..c08b89df4 --- /dev/null +++ b/kate/data/mips.xml @@ -0,0 +1,359 @@ + + + + + + .align + .ascii + .asciiz + .byte + .double + .extern + .float + .globl + .half + .sdata + .set + .space + .word + + + .data + .kdata + .ktext + .text + + + abs.d + abs.s + add + add.d + add.s + addi + addiu + addu + and + andi + bc0f + bc0t + bc1f + bc1t + bc2f + bc2t + bc3f + bc3t + beq + bgez + bgezal + bgtz + blez + bltz + bltzal + bne + break + c.eq.d + c.eq.s + c.seq.s + c.seq.d + c.ueq.s + c.ueq.d + c.olt.d + c.olt.s + c.ole.d + c.ole.s + c.ult.d + c.ult.s + c.ule.d + c.ule.s + c.le.d + c.le.s + c.lt.d + c.lt.s + c.un.s + c.un.d + cvt.d.s + cvt.d.w + cvt.s.d + cvt.s.w + cvt.w.d + cvt.w.s + div.d + div.s + j + jal + jalr + jr + lb + lbu + lh + lhu + lui + lw + lwc0 + lwc1 + lwc2 + lwc3 + lwl + lwr + mfc0 + mfc1 + mfc2 + mfc3 + mfhi + mflo + mtc0 + mtc1 + mtc2 + mtc3 + mthi + mtlo + mul.d + mul.s + mult + multu + nor + or + ori + rfe + sb + sh + sw + swcl + swl + swr + sll + sllv + slt + slti + sltiu + sra + srav + srl + srlv + sub + sub.d + sub.s + subu + sw + swc0 + swc1 + swc2 + swc3 + swl + swr + syscall + xor + xori + + + abs + b + beqz + bge + bgeu + bgt + bgtu + ble + bleu + blt + bltu + bnez + div + divu + l.d + l.s + la + ld + li + li.d + li.s + mfc0.d + mfc1.d + mfc2.d + mfc3.d + mov.d + mov.s + move + mul + mulo + mulou + neg + neg.d + neg.s + negu + nop + not + rem + remu + rol + ror + s.d + s.s + sd + seq + sge + sgeu + sgt + sgtu + sle + sleu + sne + ulh + ulhu + ulw + ush + usw + + + $0 + $1 + $2 + $3 + $4 + $5 + $6 + $7 + $8 + $9 + $10 + $11 + $12 + $13 + $14 + $15 + $16 + $17 + $18 + $19 + $20 + $21 + $22 + $23 + $24 + $25 + $26 + $27 + $28 + $29 + $30 + $31 + $zero + $t0 + $t1 + $t2 + $t3 + $t4 + $t5 + $t6 + $t7 + $t8 + $t9 + + + $v0 + $v1 + $a0 + $a1 + $a2 + $a3 + $k0 + $k1 + $at + $gp + $sp + $fp + $s0 + $s1 + $s2 + $s3 + $s4 + $s5 + $s6 + $s7 + $ra + + + $f0 + $f1 + $f2 + $f3 + $f4 + $f5 + $f6 + $f7 + $f8 + $f9 + $f10 + $f11 + $f12 + $f13 + $f14 + $f15 + $f16 + $f17 + $f18 + $f19 + $f20 + $f21 + $f22 + $f23 + $f24 + $f25 + $f26 + $f27 + $f28 + $f29 + $f30 + $f31 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/modula-2.xml b/kate/data/modula-2.xml new file mode 100644 index 000000000..c48fc09cd --- /dev/null +++ b/kate/data/modula-2.xml @@ -0,0 +1,188 @@ + + + + + + ASSEMBLER + ALLOCATE + DEALLOCATE + SIZE + Write + WriteString + WriteCard + WriteLn + WriteBf + WriteInt + WriteReal + WriteLongReal + Read + ReadString + ReadCard + ReadInt + ReadReal + ReadLongReal + Open + Close + OpenInput + OpenOutput + Accessible + Erase + EOF + Done + EmptyString + Assign + Append + Length + StrEq + Copy + Concat + pos + Delete + Insert + compare + CAPS + PutBf + GetArgs + GetEnv + ResetClock + UserTime + SystemTime + GetChar + GetInt + GetCard + GetString + GetReal + GetLongReal + PutChar + PutInt + PutCard + PutString + PutReal + PutLongReal + PutLn + + + AND + ARRAY + ASM + BEGIN + CASE + CONST + DIV + DO + ELSE + ELSIF + END + FOR + IF + IMPLEMENTATION + IN + SET + INCL + EXCL + ABS + BITSET + CAP + CHR + DEC + HALT + HIGH + INC + MAX + MIN + ODD + ORD + PROC + TRUNC + VAL + MOD + NIL + NOT + OF + OR + PROCEDURE + MODULE + DEFINITION + RECORD + REPEAT + THEN + TO + TYPE + UNTIL + LOOP + VAR + WHILE + WITH + EXIT + FALSE + TRUE + BY + FROM + IMPORT + EXPORT + QUALIFIED + RETURN + NEWPROCESS + TRANSFER + IOTRANSFER + FOREIGN + + + INTEGER + CARDINAL + SHORTINT + SHORTCARD + LONGINT + LONGREAL + CHAR + BOOLEAN + POINTER + ADDRESS + ADR + REAL + File + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/mup.xml b/kate/data/mup.xml new file mode 100644 index 000000000..890cf8c40 --- /dev/null +++ b/kate/data/mup.xml @@ -0,0 +1,865 @@ + + + + + + + + score + music + header + header2 + footer + footer2 + top + top2 + bottom + bottom2 + staff + voice + grids + music + headshapes + block + + + + + aboveorder + addtranspose + barstyle + beamslope + beamstyle + beloworder + betweenorder + bottommargin + brace + bracket + cancelkey + chorddist + clef + crescdist + defoct + dist + division + dyndist + endingstyle + firstpage + font + fontfamily + gridfret + gridsatend + gridscale + gridswhereused + key + label + label2 + leftmargin + lyricsalign + lyricsfont + lyricsfontfamily + lyricssize + measnum + measnumfont + measnumfontfamily + measnumsize + noteheads + numbermrpt + ontheline + packexp + packfact + pad + pageheight + pagewidth + panelsperpage + pedstyle + printmultnum + rehstyle + release + restcombine + restsymmult + rightmargin + scale + scorepad + scoresep + size + stafflines + staffpad + staffs + staffscale + staffsep + stemlen + swingunit + sylposition + tabwhitebox + time + timeunit + topmargin + transpose + units + visible + vscheme + warn + + + + + y + n + 2f + 2o + 3f + 3o + mussym + octave + dyn + othertext + chord + lyrics + ending + reh + up + down + major + minor + perfect + augmented + diminished + maj + min + per + aug + dim + pedal + 8treble + treble8 + treble + frenchviolin + soprano + mezzosoprano + alto + tenor + baritone + bass + cut + common + line + alt + pedstar + top + barred + grouped + times + boxed + circled + plain + 1n + 5n + 1drum + 5drum + drum + tab + inches + cm + whereused + + + + + define + ifdef + ifndef + + + + + @ + endif + + + + + else + include + undef + + + + + exclamdown + questiondown + sterling + yen + cent + quotedblbase + quotedblleft + `` + quotedblright + '' + guillemotleft + << + guillemotright + >> + guildsinglleft + guilsinglright + dagger + daggerdbl + grave + acute + macron + breve + dotaccent + dieresis + ring + cedilla + hungarumlaut + ogonek + caron + emdash + AE + ae + ordfeminine + ordmasculine + Lslash + L/ + lslash + l/ + Oslash + O/ + oslash + o/ + OE + oe + dotlessi + germandbls + ss + Aacute + A' + aacute + a' + Acircumflex + A^ + acircumflex + a^ + Adieresis + A: + adieresis + a: + Agrave + A` + agrave + a` + Aring + Ao + aring + ao + Atilde + A~ + atilde + a~ + Ccedilla + C, + ccedilla + c, + Eacute + E' + eacute + e' + Ecircumflex + E^ + ecircumflex + e^ + Edieresis + E: + edieresis + e: + Egrave + E` + egrave + e` + Iacute + I' + iacute + i' + Icircumflex + I^ + icircumflex + i^ + Idieresis + i: + idieresis + i: + Igrave + I` + igrave + i` + Ntilde + N~ + ntilde + n~ + Oacute + O' + oacute + o' + Ocircumflex + O^ + ocircumflex + o^ + Odieresis + O: + odieresis + o: + Ograve + O` + ograve + o` + Otilde + O~ + otilde + o~ + Scaron + Sv + scaron + sv + Uacute + U' + uacute + u' + Ucircumflex + U^ + ucircumflex + u^ + Udieresis + U: + udieresis + u: + Ugrave + U` + ugrave + u` + Ydieresis + Y: + ydieresis + y: + Zcaron + Zv + zcaron + zv + bullet + space + + + + + gclef + fclef + cclef + com + cut + flat + dblflat + sharp + dblsharp + nat + 4n + 2n + 1n + dblwhole + xnote + diamond + filldiamond + dwhdiamond + dn2n + dn4n + dn8n + dn16n + dn32n + dn64n + dn128n + dn256n + up2n + up4n + up8n + up16n + up32n + up64n + up128n + up256n + upflag + dnflag + qwhrest + dwhrest + 1rest + 2rest + 4rest + 8rest + 16rest + 32rest + 64rest + 128rest + 256rest + begped + endped + pedal + tr + mor + invmor + turn + invturn + ferm + uferm + acc_gt + acc_hat + acc_uhat + leg + dot + wedge + uwedge + sign + coda + upbow + dnbow + rr + measrpt + copyright + dim + halfdim + triangle + + smgclef + smfclef + smcclef + smcom + smcut + smflat + smdblflat + smsharp + smdblsharp + smnat + sm4n + sm2n + sm1n + smdblwhole + smxnote + smdiamond + smfilldiamond + smdwhdiamond + smdn2n + smdn4n + smdn8n + smdn16n + smdn32n + smdn64n + smdn128n + smdn256n + smup2n + smup4n + smup8n + smup16n + smup32n + smup64n + smup128n + smup256n + smupflag + smdnflag + smqwhrest + smdwhrest + sm1rest + sm2rest + sm4rest + sm8rest + sm16rest + sm32rest + sm64rest + sm128rest + sm256rest + smbegped + smendped + smpedal + smtr + smmor + sminvmor + smturn + sminvturn + smferm + smuferm + smacc_gt + smacc_hat + smacc_uhat + smleg + smdot + smwedge + smuwedge + smsign + smcoda + smupbow + smdnbow + smrr + smmeasrpt + smcopyright + smdim + smhalfdim + smtriangle + + + + + print + left + right + center + title + paragraph + postscript + + + + + avantgarde + bookman + courier + helvetica + newcentury + palatino + times + + + + + rom + bold + ital + boldital + + + + + chord + analysis + figbass + dyn + + + + + dotted + dashed + wavy + wide + medium + + line + curve + to + bulge + + octave + mussym + phrase + pedal + roll + to + + down + up + with + + midi + + + + + above + below + between + all + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/nasm.xml b/kate/data/nasm.xml new file mode 100644 index 000000000..8f0ef65ee --- /dev/null +++ b/kate/data/nasm.xml @@ -0,0 +1,1321 @@ + + + + + + + + + eax + ax + ah + al + ebx + bx + bh + bl + ecx + cx + ch + cl + edx + dx + dh + dl + ebp + bp + esi + si + edi + di + eip + ip + esp + sp + + cs + ds + ss + es + gs + fs + + cr0 + cr1 + cr2 + cr3 + cr4 + + st + + mm0 + mm1 + mm2 + mm3 + mm4 + mm5 + mm6 + mm7 + + xmm0 + xmm1 + xmm2 + xmm3 + xmm4 + xmm5 + xmm6 + xmm7 + + + aaa + aas + aad + aam + adc + add + addpd + addps + addsd + addss + and + andnpd + andnps + andpd + andps + arpl + bound + bsf + bsr + bswap + bt + btc + btr + bts + call + cbw + cwde + cwd + cdq + clc + cld + cli + clts + clflush + cmc + cmovcc + cmp + cmppd + cmpeqpd + cmpltpd + cmplepd + cmpunordpd + cmpneqpd + cmpnltpd + cmpnlepd + cmpordpd + cmpps + cmpeqps + cmpltps + cmpleps + cmpunordps + cmpneqps + cmpnltps + cmpnleps + cmpordps + cmpsb + cmpsw + cmpsd + cmpeqsd + cmpltsd + cmplesd + cmpunordsd + cmpneqsd + cmpnltsd + cmpnlesd + cmpordsd + cmpss + cmpeqss + cmpltss + cmpless + cmpunordss + cmpneqss + cmpnltss + cmpnless + cmpordss + cmpxchg + cmpxchg486 + cmpxchg8b + comisd + comiss + cpuid + cvtdq2pd + cvtdq2ps + cvtpd2dq + cvtpd2pi + cvtpd2ps + cvtpi2pd + cvtpi2ps + cvtps2dq + cvtps2pd + cvtps2pi + cvtsd2si + cvtsd2ss + cvtsi2sd + cvtsi2ss + cvtss2sd + cvtss2si + cvttpd2dq + cvttpd2pi + cvttps2dq + cvttps2pi + cvttsd2si + daa + das + dec + div + divpd + divps + divsd + divss + emms + enter + f2xm1 + fabs + fadd + faddp + fbld + fbstp + fchs + fclex + fnclex + fcmovb + fcmove + fcmovbe + fcmovu + fcmovnb + fcmovne + fcmovnbe + fcmovnu + fcom + fcomp + fcompp + fcomi + fcomip + fcos + fdecstp + fdisi + fndisi + feni + fneni + fdiv + fdivr + fdivp + fdivrp + femms + ffree + ffreep + fiadd + ficom + ficomp + fidiv + fidivr + fild + fist + fistp + fimul + fincstp + finit + fninit + fisub + fisubr + fld + fld1 + fldl2e + fldl2t + fldlg2 + fldln2 + fldpi + fldz + fldcw + fldenv + fmul + fmulp + fnop + fpatan + fptan + fprem + fprem1 + frndint + fsave + fnsave + frstor + fscale + fsetpm + fsin + fsincos + fsqrt + fst + fstp + fstcw + fnstcw + fstenv + fnstenv + fstsw + fnstsw + fsub + fsubr + fsubp + fsubrp + ftst + fucom + fucomp + fucompp + fucomi + fucomip + fxam + fxch + fxrstor + fxsave + fxtract + fyl2x + fyl2xp1 + hlt + ibts + idiv + imul + in + inc + insb + insw + insd + int + int1 + icebp + int01 + int3 + int03 + into + invd + invlpg + iret + iretw + iretd + jcc + jcxz + jecxz + jmp + lahf + lar + ldmxcsr + lds + les + lfs + lgs + lss + lea + leave + lfence + lgdt + lidt + lldt + lmsw + loadall + loadall286 + lodsb + lodsw + lodsd + loop + loope + loopz + loopne + loopnz + lsl + ltr + maskmovdqu + maskmovq + maxpd + maxps + maxsd + maxss + mfence + minpd + minps + minsd + minss + mov + movapd + movaps + movd + movdq2q + movdqa + movdqu + movhlps + movhpd + movhps + movlhps + movlpd + movlps + movmskpd + movmskps + movntdq + movnti + movntpd + movntps + movntq + movq + movq2dq + movsb + movsw + movsd + movss + movsx + movzx + movupd + movups + mul + mulpd + mulps + mulsd + mulss + neg + not + nop + or + orpd + orps + out + outsb + outsw + outsd + packssdw + packsswb + packuswb + packssdw + packsswb + packuswb + paddb + paddw + paddd + paddb + paddw + paddd + paddq + paddsb + paddsw + paddsb + paddsw + paddsiw + paddusb + paddusw + paddusb + paddusw + pand + pandn + pand + pandn + pause + paveb + pavgb + pavgw + pavgb + pavgw + pavgusb + pcmpeqb + pcmpeqw + pcmpeqd + pcmpgtb + pcmpgtw + pcmpgtd + pcmpeqb + pcmpeqw + pcmpeqd + pcmpgtb + pcmpgtw + pcmpgtd + pdistib + pextrw + pf2id + pf2iw + pfacc + pfadd + pfcmpeq + pfcmpge + pfcmpgt + pfmax + pfmin + pfmul + pfnacc + pfpnacc + pfrcp + pfrcpit1 + pfrcpit2 + pfrsqit1 + pfrsqrt + pfsub + pfsubr + pi2fd + pi2fw + pinsrw + pmachriw + pmaddwd + pmagw + pmaxsw + pmaxub + pminsw + pminub + pmovmskb + pmulhrwc + pmulhriw + pmulhrwa + pmulhuw + pmulhw + pmullw + pmulhw + pmullw + pmuludq + pmvzb + pmvnzb + pmvlzb + pmvgezb + pop + popa + popaw + popad + popf + popfw + popfd + por + prefetch + prefetchw + prefetchnta + prefetcht0 + prefetcht1 + prefetcht2 + psadbw + pshufd + pshufhw + pshuflw + pshufw + psllw + pslld + psllq + pslldq + psraw + psrad + psrlw + psrld + psrlq + psrldq + psubb + psubw + psubd + psubq + psubb + psubw + psubd + psubq + psubsb + psubsw + psubsb + psubsw + psubusb + psubusw + psubusb + psubusw + psubsiw + pswapd + punpckhbw + punpckhwd + punpckhdq + punpckhbw + punpckhwd + punpckhdq + punpckhqdq + punpcklbw + punpcklwd + punpckldq + punpcklbw + punpcklwd + punpckldq + punpcklqdq + push + pusha + pushad + pushaw + pushf + pushfd + pushfw + pxor + rcl + rcr + rcpps + rcpss + rdmsr + rdpmc + rdshr + rdtsc + ret + retf + retn + rol + ror + rsdc + rsldt + rsm + rsqrtps + rsqrtss + rsts + sahf + sal + sar + salc + sbb + scasb + scasw + scasd + setcc + sfence + sgdt + sidt + sldt + shl + shr + shld + shrd + shufpd + shufps + smi + smint + smintold + smsw + sqrtpd + sqrtps + sqrtsd + sqrtss + stc + std + sti + stmxcsr + stosb + stosw + stosd + str + sub + subpd + subps + subsd + subss + svdc + svldt + svts + syscall + sysenter + sysexit + sysret + test + ucomisd + ucomiss + ud0 + ud1 + ud2 + umov + unpckhpd + unpckhps + unpcklpd + unpcklps + verr + verw + wait + fwait + wbinvd + wrmsr + wrshr + xadd + xbts + xchg + xlat + xlatb + xor + xorpd + xorps + aaa + aad + aam + aas + adc + add + addpd + addps + addsd + addss + and + andnpd + andnps + andpd + andps + arpl + bound + bsf + bsr + bswap + bt + btc + btr + bts + call + cbw + cdq + clc + cld + clflush + cli + clts + cmc + cmovcc + cmp + cmpeqpd + cmpeqps + cmpeqsd + cmpeqss + cmplepd + cmpleps + cmplesd + cmpless + cmpltpd + cmpltps + cmpltsd + cmpltss + cmpneqpd + cmpneqps + cmpneqsd + cmpneqss + cmpnlepd + cmpnleps + cmpnlesd + cmpnless + cmpnltpd + cmpnltps + cmpnltsd + cmpnltss + cmpordpd + cmpordps + cmpordsd + cmpordss + cmppd + cmpps + cmpsb + cmpsd + cmpss + cmpsw + cmpunordpd + cmpunordps + cmpunordsd + cmpunordss + cmpxchg + cmpxchg486 + cmpxchg8b + comisd + comiss + cpuid + cvtdq2pd + cvtdq2ps + cvtpd2dq + cvtpd2pi + cvtpd2ps + cvtpi2pd + cvtpi2ps + cvtps2dq + cvtps2pd + cvtps2pi + cvtsd2si + cvtsd2ss + cvtsi2sd + cvtsi2ss + cvtss2sd + cvtss2si + cvttpd2dq + cvttpd2pi + cvttps2dq + cvttps2pi + cvttsd2si + cwd + cwde + daa + das + dec + div + divpd + divps + divsd + divss + emms + enter + f2xm1 + fabs + fadd + faddp + fbld + fbstp + fchs + fclex + fcmovb + fcmovbe + fcmove + fcmovnb + fcmovnbe + fcmovne + fcmovnu + fcmovu + fcom + fcomi + fcomip + fcomp + fcompp + fcos + fdecstp + fdisi + fdiv + fdivp + fdivr + fdivrp + femms + feni + ffree + ffreep + fiadd + ficom + ficomp + fidiv + fidivr + fild + fimul + fincstp + finit + fist + fistp + fisub + fisubr + fld + fld1 + fldcw + fldenv + fldl2e + fldl2t + fldlg2 + fldln2 + fldpi + fldz + fmul + fmulp + fnclex + fndisi + fneni + fninit + fnop + fnsave + fnstcw + fnstenv + fnstsw + fpatan + fprem + fprem1 + fptan + frndint + frstor + fsave + fscale + fsetpm + fsin + fsincos + fsqrt + fst + fstcw + fstenv + fstp + fstsw + fsub + fsubp + fsubr + fsubrp + ftst + fucom + fucomi + fucomip + fucomp + fucompp + fwait + fxam + fxch + fxrstor + fxsave + fxtract + fyl2x + fyl2xp1 + hlt + ibts + icebp + idiv + imul + in + inc + insb + insd + insw + int + int01 + int03 + int1 + int3 + into + invd + invlpg + iret + iretd + iretw + jcc + jcxz + jecxz + jmp + lahf + lar + ldmxcsr + lds + lea + leave + les + lfence + lfs + lgdt + lgs + lidt + lldt + lmsw + loadall + loadall286 + lodsb + lodsd + lodsw + loop + loope + loopne + loopnz + loopz + lsl + lss + ltr + maskmovdqu + maskmovq + maxpd + maxps + maxsd + maxss + mfence + minpd + minps + minsd + minss + mov + movapd + movaps + movd + movdq2q + movdqa + movdqu + movhlps + movhpd + movhps + movlhps + movlpd + movlps + movmskpd + movmskps + movntdq + movnti + movntpd + movntps + movntq + movq + movq2dq + movsb + movsd + movss + movsw + movsx + movupd + movups + movzx + mul + mulpd + mulps + mulsd + mulss + neg + nop + not + or + orpd + orps + out + outsb + outsd + outsw + packssdw + packsswb + packuswb + paddb + paddd + paddq + paddsb + paddsiw + paddsw + paddusb + paddusw + paddw + pand + pandn + pause + paveb + pavgb + pavgusb + pavgw + pcmpeqb + pcmpeqd + pcmpeqw + pcmpgtb + pcmpgtd + pcmpgtw + pdistib + pextrw + pf2id + pf2iw + pfacc + pfadd + pfcmpeq + pfcmpge + pfcmpgt + pfmax + pfmin + pfmul + pfnacc + pfpnacc + pfrcp + pfrcpit1 + pfrcpit2 + pfrsqit1 + pfrsqrt + pfsub + pfsubr + pi2fd + pi2fw + pinsrw + pmachriw + pmaddwd + pmagw + pmaxsw + pmaxub + pminsw + pminub + pmovmskb + pmulhriw + pmulhrwa + pmulhrwc + pmulhuw + pmulhw + pmullw + pmuludq + pmvgezb + pmvlzb + pmvnzb + pmvzb + pop + popa + popad + popaw + popf + popfd + popfw + por + prefetch + prefetchnta + prefetcht0 + prefetcht1 + prefetcht2 + prefetchw + psadbw + pshufd + pshufhw + pshuflw + pshufw + pslld + pslldq + psllq + psllw + psrad + psraw + psrld + psrldq + psrlq + psrlw + psubb + psubd + psubq + psubsb + psubsiw + psubsw + psubusb + psubusw + psubw + pswapd + punpckhbw + punpckhdq + punpckhqdq + punpckhwd + punpcklbw + punpckldq + punpcklqdq + punpcklwd + push + pusha + pushad + pushaw + pushf + pushfd + pushfw + pxor + rcl + rcpps + rcpss + rcr + rdmsr + rdpmc + rdshr + rdtsc + ret + retf + retn + rol + ror + rsdc + rsldt + rsm + rsqrtps + rsqrtss + rsts + sahf + sal + salc + sar + sbb + scasb + scasd + scasw + setcc + sfence + sgdt + shl + shld + shr + shrd + shufpd + shufps + sidt + sldt + smi + smint + smintold + smsw + sqrtpd + sqrtps + sqrtsd + sqrtss + stc + std + sti + stmxcsr + stosb + stosd + stosw + str + sub + subpd + subps + subsd + subss + svdc + svldt + svts + syscall + sysenter + sysexit + sysret + test + ucomisd + ucomiss + ud0 + ud1 + ud2 + umov + unpckhpd + unpckhps + unpcklpd + unpcklps + verr + verw + wait + wbinvd + wrmsr + wrshr + xadd + xbts + xchg + xlat + xlatb + xor + xorpd + xorps + + + + times + + equ + + db + dw + dd + dq + dt + + resb + resw + resd + resq + rest + + incbin + + byte + word + dword + qword + short + ptr + + + + org + bits + use16 + use32 + section + segment + __sect__ + absolute + extern + global + common + seg + wrt + strict + + struc + endstruc + istruc + at + iend + align + alignb + + __NASM_MAJOR__ + __NASM_MINOR__ + __NASM_SUBMINOR__ + ___NASM_PATCHLEVEL__ + __NASM_VERSION_ID__ + __NASM_VER__ + __FILE__ + __LINE__ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/objectivec.xml b/kate/data/objectivec.xml new file mode 100644 index 000000000..0e931f7f0 --- /dev/null +++ b/kate/data/objectivec.xml @@ -0,0 +1,128 @@ + + + + + + break + case + continue + default + do + else + enum + extern + for + goto + if + return + sizeof + struct + switch + typedef + union + while + @class + @defs + @encode + @end + @implementation + @interface + @private + @protected + @protocol + @public + @selector + self + super + + + auto + char + const + double + float + int + long + register + short + signed + static + unsigned + void + volatile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/ocaml.xml b/kate/data/ocaml.xml new file mode 100644 index 000000000..6d7a07d49 --- /dev/null +++ b/kate/data/ocaml.xml @@ -0,0 +1,181 @@ + + + + + + + +]> + + + + + + + + declare + value + where + + + and + as + assert + asr + begin + class + closed + constraint + do + done + downto + else + end + exception + external + false + for + fun + function + functor + if + in + include + inherit + land + lazy + let + lor + lsl + lsr + lxor + match + method + mod + module + mutable + new + of + open + or + parser + private + rec + sig + struct + then + to + true + try + type + val + virtual + when + while + with + + + exn + lazy_t + format + unit + int + real + char + string + ref + array + bool + list + option + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/octave.xml b/kate/data/octave.xml new file mode 100644 index 000000000..a01ed3eb4 --- /dev/null +++ b/kate/data/octave.xml @@ -0,0 +1,2219 @@ + + + + + + + + + + + + all_va_args + break + case + continue + else + elseif + end_unwind_protect + global + gplot + gsplot + otherwise + persistent + replot + return + static + until + unwind_protect + unwind_protect_cleanup + varargin + varargout + + + + argv + e + eps + false + F_DUPFD + F_GETFD + F_GETFL + filesep + F_SETFD + F_SETFL + i + I + inf + Inf + j + J + NA + nan + NaN + O_APPEND + O_ASYNC + O_CREAT + OCTAVE_HOME + OCTAVE_VERSION + O_EXCL + O_NONBLOCK + O_RDONLY + O_RDWR + O_SYNC + O_TRUNC + O_WRONLY + pi + program_invocation_name + program_name + P_tmpdir + realmax + realmin + SEEK_CUR + SEEK_END + SEEK_SET + SIG + stderr + stdin + stdout + true + ans + automatic_replot + beep_on_error + completion_append_char + crash_dumps_octave_core + current_script_file_name + debug_on_error + debug_on_interrupt + debug_on_warning + debug_symtab_lookups + DEFAULT_EXEC_PATH + DEFAULT_LOADPATH + default_save_format + echo_executing_commands + EDITOR + EXEC_PATH + FFTW_WISDOM_PROGRAM + fixed_point_format + gnuplot_binary + gnuplot_command_axes + gnuplot_command_end + gnuplot_command_plot + gnuplot_command_replot + gnuplot_command_splot + gnuplot_command_title + gnuplot_command_using + gnuplot_command_with + gnuplot_has_frames + history_file + history_size + ignore_function_time_stamp + IMAGEPATH + INFO_FILE + INFO_PROGRAM + __kluge_procbuf_delay__ + LOADPATH + MAKEINFO_PROGRAM + max_recursion_depth + octave_core_file_format + octave_core_file_limit + octave_core_file_name + output_max_field_width + output_precision + page_output_immediately + PAGER + page_screen_output + print_answer_id_name + print_empty_dimensions + print_rhs_assign_val + PS1 + PS2 + PS4 + save_header_format_string + save_precision + saving_history + sighup_dumps_octave_core + sigterm_dumps_octave_core + silent_functions + split_long_rows + string_fill_char + struct_levels_to_print + suppress_verbose_help_message + variables_can_hide_functions + warn_assign_as_truth_value + warn_divide_by_zero + warn_empty_list_elements + warn_fortran_indexing + warn_function_name_clash + warn_future_time_stamp + warn_imag_to_real + warn_matlab_incompatible + warn_missing_semicolon + warn_neg_dim_as_zero + warn_num_to_str + warn_precedence_change + warn_reload_forces_clear + warn_resize_on_range_error + warn_separator_insert + warn_single_quote_string + warn_str_to_num + warn_undefined_return_values + warn_variable_switch_label + whos_line_format + + + + casesen + cd + chdir + clear + dbclear + dbstatus + dbstop + dbtype + dbwhere + diary + echo + edit_history + __end__ + format + gset + gshow + help + history + hold + iskeyword + isvarname + load + ls + mark_as_command + mislocked + mlock + more + munlock + run_history + save + set + show + type + unmark_command + which + who + whos + + + + abs + acos + acosh + all + angle + any + append + arg + argnames + asin + asinh + assignin + atan + atan2 + atanh + atexit + bitand + bitmax + bitor + bitshift + bitxor + casesen + cat + cd + ceil + cell + cell2struct + cellstr + char + chdir + class + clc + clear + clearplot + clg + closeplot + completion_matches + conj + conv + convmtx + cos + cosh + cumprod + cumsum + dbclear + dbstatus + dbstop + dbtype + dbwhere + deconv + det + dftmtx + diag + diary + disp + document + do_string_escapes + double + dup2 + echo + edit_history + __end__ + erf + erfc + ERRNO + error + __error_text__ + error_text + eval + evalin + exec + exist + exit + exp + eye + fclose + fcntl + fdisp + feof + ferror + feval + fflush + fft + fgetl + fgets + fieldnames + file_in_loadpath + file_in_path + filter + find + find_first_of_in_loadpath + finite + fix + floor + fmod + fnmatch + fopen + fork + format + formula + fprintf + fputs + fread + freport + frewind + fscanf + fseek + ftell + func2str + functions + fwrite + gamma + gammaln + getegid + getenv + geteuid + getgid + getpgrp + getpid + getppid + getuid + glob + graw + gset + gshow + help + history + hold + home + horzcat + ifft + imag + inline + input + input_event_hook + int16 + int32 + int64 + int8 + intmax + intmin + inv + inverse + ipermute + isalnum + isalpha + isascii + isbool + iscell + iscellstr + ischar + iscntrl + iscomplex + isdigit + isempty + isfield + isfinite + isglobal + isgraph + ishold + isieee + isinf + iskeyword + islist + islogical + islower + ismatrix + isna + isnan + is_nan_or_na + isnumeric + isprint + ispunct + isreal + isspace + isstream + isstreamoff + isstruct + isupper + isvarname + isxdigit + kbhit + keyboard + kill + lasterr + lastwarn + length + lgamma + link + linspace + list + load + log + log10 + ls + lstat + lu + mark_as_command + mislocked + mkdir + mkfifo + mkstemp + mlock + more + munlock + nargin + nargout + native_float_format + ndims + nth + numel + octave_config_info + octave_tmp_file_name + ones + pause + pclose + permute + pipe + popen + printf + __print_symbol_info__ + __print_symtab_info__ + prod + purge_tmp_files + putenv + puts + pwd + quit + rank + readdir + readlink + read_readline_init_file + real + rehash + rename + reshape + reverse + rmdir + rmfield + roots + round + run_history + save + scanf + set + shell_cmd + show + sign + sin + sinh + size + sizeof + sleep + sort + source + splice + sprintf + sqrt + squeeze + sscanf + stat + str2func + streamoff + struct + struct2cell + sum + sumsq + symlink + system + tan + tanh + tilde_expand + tmpfile + tmpnam + toascii + __token_count__ + tolower + toupper + type + typeinfo + uint16 + uint32 + uint64 + uint8 + umask + undo_string_escapes + unlink + unmark_command + usage + usleep + va_arg + va_start + vectorize + vertcat + vr_val + waitpid + warning + warranty + which + who + whos + zeros + airy + balance + besselh + besseli + besselj + besselk + bessely + betainc + chol + colloc + daspk + daspk_options + dasrt + dasrt_options + dassl + dassl_options + det + eig + endgrent + endpwent + expm + fft + fft2 + fftn + fftw_wisdom + filter + find + fsolve + fsolve_options + gammainc + gcd + getgrent + getgrgid + getgrnam + getpwent + getpwnam + getpwuid + getrusage + givens + gmtime + hess + ifft + ifft2 + ifftn + inv + inverse + kron + localtime + lpsolve + lpsolve_options + lsode + lsode_options + lu + max + min + minmax + mktime + odessa + odessa_options + pinv + qr + quad + quad_options + qz + rand + randn + schur + setgrent + setpwent + sort + sqrtm + strftime + strptime + svd + syl + time + abcddim + __abcddims__ + acot + acoth + acsc + acsch + analdemo + anova + arch_fit + arch_rnd + arch_test + are + arma_rnd + asctime + asec + asech + autocor + autocov + autoreg_matrix + axis + axis2dlim + __axis_label__ + bar + bartlett + bartlett_test + base2dec + bddemo + beep + bessel + beta + beta_cdf + betai + beta_inv + beta_pdf + beta_rnd + bin2dec + bincoeff + binomial_cdf + binomial_inv + binomial_pdf + binomial_rnd + bitcmp + bitget + bitset + blackman + blanks + bode + bode_bounds + __bodquist__ + bottom_title + bug_report + buildssic + c2d + cart2pol + cart2sph + cauchy_cdf + cauchy_inv + cauchy_pdf + cauchy_rnd + cellidx + center + chisquare_cdf + chisquare_inv + chisquare_pdf + chisquare_rnd + chisquare_test_homogeneity + chisquare_test_independence + circshift + clock + cloglog + close + colormap + columns + com2str + comma + common_size + commutation_matrix + compan + complement + computer + cond + contour + controldemo + conv + cor + corrcoef + cor_test + cot + coth + cov + cputime + create_set + cross + csc + csch + ctime + ctrb + cut + d2c + damp + dare + date + dcgain + deal + deblank + dec2base + dec2bin + dec2hex + deconv + delete + DEMOcontrol + demoquat + detrend + dezero + dgkfdemo + dgram + dhinfdemo + diff + diffpara + dir + discrete_cdf + discrete_inv + discrete_pdf + discrete_rnd + dkalman + dlqe + dlqg + dlqr + dlyap + dmr2d + dmult + dot + dre + dump_prefs + duplication_matrix + durbinlevinson + empirical_cdf + empirical_inv + empirical_pdf + empirical_rnd + erfinv + __errcomm__ + errorbar + __errplot__ + etime + exponential_cdf + exponential_inv + exponential_pdf + exponential_rnd + f_cdf + fftconv + fftfilt + fftshift + figure + fileparts + findstr + f_inv + fir2sys + flipdim + fliplr + flipud + flops + f_pdf + fractdiff + frdemo + freqchkw + __freqresp__ + freqz + freqz_plot + f_rnd + f_test_regression + fullfile + fv + fvl + gamma_cdf + gammai + gamma_inv + gamma_pdf + gamma_rnd + geometric_cdf + geometric_inv + geometric_pdf + geometric_rnd + gls + gram + gray + gray2ind + grid + h2norm + h2syn + hamming + hankel + hanning + hex2dec + hilb + hinf_ctr + hinfdemo + hinfnorm + hinfsyn + hinfsyn_chk + hinfsyn_ric + hist + hotelling_test + hotelling_test_2 + housh + hsv2rgb + hurst + hypergeometric_cdf + hypergeometric_inv + hypergeometric_pdf + hypergeometric_rnd + image + imagesc + impulse + imshow + ind2gray + ind2rgb + ind2sub + index + int2str + intersection + invhilb + iqr + irr + isa + is_abcd + is_bool + is_complex + is_controllable + isdefinite + is_detectable + is_dgkf + is_digital + is_duplicate_entry + is_global + is_leap_year + isletter + is_list + is_matrix + is_observable + ispc + is_sample + is_scalar + isscalar + is_signal_list + is_siso + is_square + issquare + is_stabilizable + is_stable + isstr + is_stream + is_struct + is_symmetric + issymmetric + isunix + is_vector + isvector + jet707 + kendall + kolmogorov_smirnov_cdf + kolmogorov_smirnov_test + kolmogorov_smirnov_test_2 + kruskal_wallis_test + krylov + krylovb + kurtosis + laplace_cdf + laplace_inv + laplace_pdf + laplace_rnd + lcm + lin2mu + listidx + list_primes + loadaudio + loadimage + log2 + logical + logistic_cdf + logistic_inv + logistic_pdf + logistic_regression + logistic_regression_derivatives + logistic_regression_likelihood + logistic_rnd + logit + loglog + loglogerr + logm + lognormal_cdf + lognormal_inv + lognormal_pdf + lognormal_rnd + logspace + lower + lqe + lqg + lqr + lsim + ltifr + lyap + mahalanobis + manova + mcnemar_test + mean + meansq + median + menu + mesh + meshdom + meshgrid + minfo + mod + moddemo + moment + mplot + mu2lin + multiplot + nargchk + nextpow2 + nichols + norm + normal_cdf + normal_inv + normal_pdf + normal_rnd + not + nper + npv + ntsc2rgb + null + num2str + nyquist + obsv + ocean + ols + oneplot + ord2 + orth + __outlist__ + pack + packedform + packsys + parallel + paren + pascal_cdf + pascal_inv + pascal_pdf + pascal_rnd + path + periodogram + perror + place + playaudio + plot + plot_border + __plr__ + __plr1__ + __plr2__ + __plt__ + __plt1__ + __plt2__ + __plt2mm__ + __plt2mv__ + __plt2ss__ + __plt2vm__ + __plt2vv__ + __pltopt__ + __pltopt1__ + pmt + poisson_cdf + poisson_inv + poisson_pdf + poisson_rnd + pol2cart + polar + poly + polyder + polyderiv + polyfit + polyinteg + polyout + polyreduce + polyval + polyvalm + popen2 + postpad + pow2 + ppplot + prepad + probit + prompt + prop_test_2 + pv + pvl + pzmap + qconj + qcoordinate_plot + qderiv + qderivmat + qinv + qmult + qqplot + qtrans + qtransv + qtransvmat + quaternion + qzhess + qzval + randperm + range + rank + ranks + rate + record + rectangle_lw + rectangle_sw + rem + repmat + residue + rgb2hsv + rgb2ind + rgb2ntsc + rindex + rldemo + rlocus + roots + rot90 + rotdim + rotg + rows + run_cmd + run_count + run_test + saveaudio + saveimage + sec + sech + semicolon + semilogx + semilogxerr + semilogy + semilogyerr + series + setaudio + setstr + shg + shift + shiftdim + sign_test + sinc + sinetone + sinewave + skewness + sombrero + sortcom + spearman + spectral_adf + spectral_xdf + spencer + sph2cart + split + ss + ss2sys + ss2tf + ss2zp + stairs + starp + statistics + std + stdnormal_cdf + stdnormal_inv + stdnormal_pdf + stdnormal_rnd + step + __stepimp__ + stft + str2mat + str2num + strappend + strcat + strcmp + strerror + strjust + strrep + struct_contains + struct_elements + studentize + sub2ind + subplot + substr + subwindow + swap + swapcols + swaprows + sylvester_matrix + synthesis + sys2fir + sys2ss + sys2tf + sys2zp + sysadd + sysappend + syschnames + __syschnamesl__ + syschtsam + __sysconcat__ + sysconnect + syscont + __syscont_disc__ + __sysdefioname__ + __sysdefstname__ + sysdimensions + sysdisc + sysdup + sysgetsignals + sysgettsam + sysgettype + sysgroup + __sysgroupn__ + sysidx + sysmin + sysmult + sysout + sysprune + sysreorder + sysrepdemo + sysscale + syssetsignals + syssub + sysupdate + table + t_cdf + tempdir + tempname + texas_lotto + tf + tf2ss + tf2sys + __tf2sysl__ + tf2zp + __tfl__ + tfout + tic + t_inv + title + toc + toeplitz + top_title + t_pdf + trace + triangle_lw + triangle_sw + tril + triu + t_rnd + t_test + t_test_2 + t_test_regression + tzero + tzero2 + ugain + uniform_cdf + uniform_inv + uniform_pdf + uniform_rnd + union + unix + unpacksys + unwrap + upper + u_test + values + vander + var + var_test + vec + vech + version + vol + weibull_cdf + weibull_inv + weibull_pdf + weibull_rnd + welch_test + wgt1o + wiener_rnd + wilcoxon_test + xlabel + xor + ylabel + yulewalker + zgfmul + zgfslv + zginit + __zgpbal__ + zgreduce + zgrownorm + zgscal + zgsgiv + zgshsr + zlabel + zp + zp2ss + __zp2ssg2__ + zp2sys + zp2tf + zpout + z_test + z_test_2 + + + + airy_Ai + airy_Ai_deriv + airy_Ai_deriv_scaled + airy_Ai_scaled + airy_Bi + airy_Bi_deriv + airy_Bi_deriv_scaled + airy_Bi_scaled + airy_zero_Ai + airy_zero_Ai_deriv + airy_zero_Bi + airy_zero_Bi_deriv + atanint + bchdeco + bchenco + bessel_il_scaled + bessel_In + bessel_In_scaled + bessel_Inu + bessel_Inu_scaled + bessel_jl + bessel_Jn + bessel_Jnu + bessel_kl_scaled + bessel_Kn + bessel_Kn_scaled + bessel_Knu + bessel_Knu_scaled + bessel_lnKnu + bessel_yl + bessel_Yn + bessel_Ynu + bessel_zero_J0 + bessel_zero_J1 + beta_gsl + bfgsmin + bisectionstep + builtin + bwfill + bwlabel + cell2csv + celleval + Chi + chol + Ci + clausen + conicalP_0 + conicalP_1 + conicalP_half + conicalP_mhalf + conv2 + cordflt2 + coupling_3j + coupling_6j + coupling_9j + csv2cell + csvconcat + csvexplode + cyclgen + cyclpoly + dawson + debye_1 + debye_2 + debye_3 + debye_4 + deref + dispatch + dispatch_help + display_fixed_operations + dlmread + ellint_Ecomp + ellint_Kcomp + ellipj + erfc_gsl + erf_gsl + erf_Q + erf_Z + _errcore + eta + eta_int + expint_3 + expint_E1 + expint_E2 + expint_Ei + expm1 + exp_mult + exprel + exprel_2 + exprel_n + fabs + fangle + farg + fatan2 + fceil + fconj + fcos + fcosh + fcumprod + fcumsum + fdiag + fermi_dirac_3half + fermi_dirac_half + fermi_dirac_inc_0 + fermi_dirac_int + fermi_dirac_mhalf + fexp + ffloor + fimag + finitedifference + fixed + flog + flog10 + fprod + freal + freshape + fround + fsin + fsinh + fsqrt + fsum + fsumsq + ftan + ftanh + full + gamma_gsl + gamma_inc + gamma_inc_P + gamma_inc_Q + gammainv_gsl + gammastar + gdet + gdiag + gexp + gf + gfilter + _gfweight + ginv + ginverse + glog + glu + gpick + gprod + grab + grank + graycomatrix + __grcla__ + __grclf__ + __grcmd__ + greshape + __grexit__ + __grfigure__ + __grgetstat__ + __grhold__ + __grinit__ + __grishold__ + __grnewset__ + __grsetgraph__ + gsl_sf + gsqrt + gsum + gsumsq + gtext + gzoom + hazard + houghtf + hyperg_0F1 + hzeta + is_complex_sparse + isfixed + isgalois + isprimitive + is_real_sparse + is_sparse + jpgread + jpgwrite + lambert_W0 + lambert_Wm1 + legendre_Pl + legendre_Plm + legendre_Ql + legendre_sphPlm + legendre_sphPlm_array + leval + listen + lnbeta + lncosh + lngamma_gsl + lnpoch + lnsinh + log_1plusx + log_1plusx_mx + log_erfc + lp + make_sparse + mark_for_deletion + medfilt1 + newtonstep + nnz + numgradient + numhessian + pchip_deriv + pngread + pngwrite + poch + pochrel + pretty + primpoly + psi + psi_1_int + psi_1piy + psi_n + rand + rande + randn + randp + regexp + remez + reset_fixed_operations + rotate_scale + rsdec + rsenc + samin + SBBacksub + SBEig + SBFactor + SBProd + SBSolve + Shi + Si + sinc_gsl + spabs + sparse + spfind + spimag + spinv + splu + spreal + SymBand + synchrotron_1 + synchrotron_2 + syndtable + taylorcoeff + transport_2 + transport_3 + transport_4 + transport_5 + trisolve + waitbar + xmlread + zeta + zeta_int + aar + aarmam + ac2poly + ac2rc + acorf + acovf + addpath + ademodce + adim + adsmax + amodce + anderson_darling_cdf + anderson_darling_test + anovan + apkconst + append_save + applylut + ar2poly + ar2rc + arburg + arcext + arfit2 + ar_spa + aryule + assert + au + aucapture + auload + auplot + aurecord + ausave + autumn + average_moments + awgn + azimuth + BandToFull + BandToSparse + base64encode + battery + bchpoly + bestblk + best_dir + best_dir_cov + betaln + bfgs + bfgsmin_example + bi2de + biacovf + bilinear + bisdemo + bispec + biterr + blkdiag + blkproc + bmpwrite + bone + bound_convex + boxcar + boxplot + brighten + bs_gradient + butter + buttord + bwborder + bweuler + bwlabel + bwmorph + bwselect + calendar + cceps + cdiff + cellstr + char + cheb + cheb1ord + cheb2ord + chebwin + cheby1 + cheby2 + chirp + clf + clip + cmpermute + cmunique + cohere + col2im + colfilt + colorgradient + comms + compand + complex + concat + conndef + content + contents + Contents + contourf + convhull + convmtx + cool + copper + corr2 + cosets + count + covm + cplxpair + cquadnd + create_lookup_table + crule + crule2d + crule2dgen + csape + csapi + csd + csvread + csvwrite + ctranspose + cumtrapz + czt + d2_min + datenum + datestr + datevec + dct + dct2 + dctmtx + de2bi + deal + decimate + decode + deg2rad + del2 + delaunay + delaunay3 + delta_method + demo + demodmap + deriv + detrend + dfdp + dftmtx + dhbar + dilate + dispatch + distance + dlmread + dlmwrite + dos + double + drawnow + durlev + dxfwrite + edge + edit + ellip + ellipdemo + ellipj + ellipke + ellipord + __ellip_ws + __ellip_ws_min + encode + eomday + erode + example + ExampleEigenValues + ExampleGenEigenValues + expdemo + expfit + eyediagram + factor + factorial + fail + fcnchk + feedback + fem_test + ff2n + fftconv2 + fieldnames + fill + fill3 + filter2 + filtfilt + filtic + findsym + fir1 + fir2 + fixedpoint + flag + flag_implicit_samplerate + flattopwin + flix + float + fmin + fminbnd + fmins + fminunc + fnder + fnplt + fnval + fplot + freqs + freqs_plot + fsort + fullfact + FullToBand + funm + fzero + gammaln + gapTest + gaussian + gausswin + gconv + gconvmtx + gdeconv + gdftmtx + gen2par + geomean + getfield + getfields + gfft + gftable + gfweight + gget + gifft + ginput + gmm_estimate + gmm_example + gmm_obj + gmm_results + gmm_variance + gmm_variance_inefficient + gquad + gquad2d + gquad2d6 + gquad2dgen + gquad6 + gquadnd + grace_octave_path + gradient + grayslice + grep + grid + griddata + groots + grpdelay + grule + grule2d + grule2dgen + hadamard + hammgen + hankel + hann + harmmean + hilbert + histeq + histfit + histo + histo2 + histo3 + histo4 + hot + hsv + hup + idct + idct2 + idplot + idsim + ifftshift + im2bw + im2col + imadjust + imginfo + imhist + imnoise + impad + impz + imread + imrotate + imshear + imtranslate + imwrite + innerfun + inputname + interp + interp1 + interp2 + interpft + intersect + invest0 + invest1 + invfdemo + invfreq + invfreqs + invfreqz + inz + irsa_act + irsa_actcore + irsa_check + irsa_dft + irsa_dftfp + irsa_genreal + irsa_idft + irsa_isregular + irsa_jitsp + irsa_mdsp + irsa_normalize + irsa_plotdft + irsa_resample + irsa_rgenreal + isa + isbw + isdir + isequal + isfield + isgray + isind + ismember + isprime + isrgb + issparse + isunix + jet + kaiser + kaiserord + lambertw + lattice + lauchli + leasqr + leasqrdemo + legend + legendre + levinson + lin2mu + line_min + lloyds + lookup + lookup_table + lpc + lp_test + mad + magic + makelut + MakeShears + map + mat2gray + mat2str + mdsmax + mean2 + medfilt2 + meshc + minimize + minpol + mkpp + mktheta + mle_estimate + mle_example + mle_obj + mle_results + mle_variance + modmap + mu2lin + mvaar + mvar + mvfilter + mvfreqz + myfeval + nanmax + nanmean + nanmedian + nanmin + nanstd + nansum + ncauer + nchoosek + ncrule + ndims + nelder_mead_min + newmark + nlfilter + nlnewmark + __nlnewmark_fcn__ + nmsmax + nonzeros + normplot + now + nrm + nthroot + nze + OCTAVE_FORGE_VERSION + ode23 + ode45 + ode78 + optimset + ordfilt2 + orient + pacf + padarray + parameterize + parcor + pareto + pascal + patch + pburg + pcg + pchip + pcolor + pcr + peaks + penddot + pendulum + perms + pie + pink + plot3 + __plt3__ + poly2ac + poly2ar + poly_2_ex + poly2mask + poly2rc + poly2sym + poly2th + polyarea + polyconf + polyder + polyderiv + polygcd + polystab + __power + ppval + prctile + prettyprint + prettyprint_c + primes + princomp + print + prism + proplan + pulstran + pwelch + pyulear + qaskdeco + qaskenco + qtdecomp + qtgetblk + qtsetblk + quad2dc + quad2dcgen + quad2dg + quad2dggen + quadc + quadg + quadl + quadndg + quantiz + quiver + rad2deg + rainbow + randerr + randint + randsrc + rat + rats + rc2ac + rc2ar + rc2poly + rceps + read_options + read_pdb + rectpuls + resample + rgb2gray + rk2fixed + rk4fixed + rk8fixed + rmfield + rmle + rmpath + roicolor + rosser + rotparams + rotv + rref + rsdecof + rsencof + rsgenpoly + samin_example + save_vrml + sbispec + scale_data + scatter + scatterplot + select_3D_points + selmo + setdiff + setfield + setfields + setxor + sftrans + sgolay + sgolayfilt + sinvest1 + slurp_file + sortrows + sound + soundsc + spdiags + specgram + speed + speye + spfun + sphcat + spline + splot + spones + sprand + sprandn + spring + spstats + spsum + sp_test + sptest + spvcat + spy + std2 + stem + str2double + strcmpi + stretchlim + strfind + strmatch + strncmp + strncmpi + strsort + strtok + strtoz + struct + strvcat + summer + sumskipnan + surf + surfc + sym2poly + symerr + symfsolve + tabulate + tar + temp_name + test + test_d2_min_1 + test_d2_min_2 + test_d2_min_3 + test_ellipj + test_fminunc_1 + testimio + test_inline_1 + test_min_1 + test_min_2 + test_min_3 + test_min_4 + test_minimize_1 + test_nelder_mead_min_1 + test_nelder_mead_min_2 + test_sncndn + test_struct + test_vmesh + test_vrml_faces + test_wpolyfit + text + textread + tf2zp + tfe + thfm + tics + toeplitz + toggle_grace_use + transpose + trapz + triang + tril + trimmean + tripuls + trisolve + triu + tsademo + tsearchdemo + ucp + uintlut + unique + unix + unmkpp + unscale_parameters + vec2mat + view + vmesh + voronoi + voronoin + vrml_arrow + vrml_Background + vrml_browse + vrml_cyl + vrml_demo_tutorial_1 + vrml_demo_tutorial_2 + vrml_demo_tutorial_3 + vrml_demo_tutorial_4 + vrml_ellipsoid + vrml_faces + vrml_flatten + vrml_frame + vrml_group + vrml_kill + vrml_lines + vrml_material + vrml_parallelogram + vrml_PointLight + vrml_points + vrml_select_points + vrml_surf + vrml_text + vrml_thick_surf + vrml_transfo + wavread + wavwrite + weekday + wgn + white + wilkinson + winter + wpolyfit + wpolyfitdemo + write_pdb + wsolve + xcorr + xcorr2 + xcov + xlsread + xmlwrite + y2res + zero_count + zoom + zp2tf + zplane + zscore + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/pascal.xml b/kate/data/pascal.xml new file mode 100644 index 000000000..6830c755e --- /dev/null +++ b/kate/data/pascal.xml @@ -0,0 +1,193 @@ + + + + + + and + array + asm + case + const + div + do + downto + else + file + for + function + goto + if + in + label + mod + nil + not + of + operator + or + packed + procedure + program + record + repeat + set + then + to + type + unit + until + uses + var + while + with + xor + + + at + automated + break + continue + dispinterface + dispose + exit + false + finalization + initialization + library + new + published + resourcestring + self + true + + + abstract + as + bindable + constructor + destructor + except + export + finally + import + implementation + inherited + inline + interface + is + module + on + only + otherwise + override + private + property + protected + public + read + qualified + raise + restricted + shl + shr + threadvar + try + virtual + write + + + Integer + Cardinal + ShortInt + SmallInt + LongInt + Int64 + Byte + Word + LongWord + Char + AnsiChar + WideChar + Boolean + ByteBool + WordBool + LongBool + Single + Double + Extended + Comp + Currency + Real + Real48 + String + ShortString + AnsiString + WideString + Pointer + Variant + File + Text + + + FIXME + TODO + ### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/perl.xml b/kate/data/perl.xml new file mode 100644 index 000000000..15212c376 --- /dev/null +++ b/kate/data/perl.xml @@ -0,0 +1,827 @@ + + + + + + + if + unless + else + elsif + while + until + for + each + foreach + next + last + break + continue + return + use + no + require + my + our + local + BEGIN + END + require + package + sub + do + __END__ + __DATA__ + __FILE__ + __LINE__ + __PACKAGE__ + + + = + != + ~= + += + -= + *= + /= + **= + |= + ||= + &= + &&= + ?= + + + - + * + + % + || + && + | + & + < + << + > + >> + ^ + -> + => + . + , + ; + :: + \ + and + or + not + eq + ne + + + abs + accept + alarm + atan2 + bind + binmode + bless + caller + chdir + chmod + chomp + chop + chown + chr + chroot + close + closedir + connect + cos + crypt + dbmclose + dbmopen + defined + delete + die + dump + endgrent + endhostent + endnetent + endprotoent + endpwent + endservent + eof + eval + exec + exists + exit + exp + fcntl + fileno + flock + fork + format + formline + getc + getgrent + getgrgid + getgrnam + gethostbyaddr + gethostbyname + gethostent + getlogin + getnetbyaddr + getnetbyname + getnetent + getpeername + getpgrp + getppid + getpriority + getprotobyname + getprotobynumber + getprotoent + getpwent + getpwnam + getpwuid + getservbyname + getservbyport + getservent + getsockname + getsockopt + glob + gmtime + goto + grep + hex + import + index + int + ioctl + join + keys + kill + last + lc + lcfirst + length + link + listen + localtime + lock + log + lstat + map + mkdir + msgctl + msgget + msgrcv + msgsnd + oct + open + opendir + ord + pack + package + pipe + pop + pos + print + printf + prototype + push + quotemeta + rand + read + readdir + readline + readlink + recv + redo + ref + rename + reset + return + reverse + rewinddir + rindex + rmdir + scalar + seek + seekdir + select + semctl + semget + semop + send + setgrent + sethostent + setnetent + setpgrp + setpriority + setprotoent + setpwent + setservent + setsockopt + shift + shmctl + shmget + shmread + shmwrite + shutdown + sin + sleep + socket + socketpair + sort + splice + split + sprintf + sqrt + srand + stat + study + sub + substr + symlink + syscall + sysread + sysseek + system + syswrite + tell + telldir + tie + time + times + truncate + uc + ucfirst + umask + undef + unlink + unpack + unshift + untie + utime + values + vec + wait + waitpid + wantarray + warn + write + + + strict + english + warnings + vars + subs + utf8 + sigtrap + locale + open + less + integer + filetest + constant + bytes + diagnostics + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/php.xml b/kate/data/php.xml new file mode 100644 index 000000000..9819a2783 --- /dev/null +++ b/kate/data/php.xml @@ -0,0 +1,6549 @@ + + + + diff --git a/kate/data/picsrc.xml b/kate/data/picsrc.xml new file mode 100644 index 000000000..57386f559 --- /dev/null +++ b/kate/data/picsrc.xml @@ -0,0 +1,402 @@ + + + + + + + + + + + __BADRAM + __CONFIG + __IDLOCS + __MAXRAM + + cblock + constant + da + data + db + de + dt + dw + endc + endm + equ + error + errorlevel + exitm + fill + list + local + macro + messg + noexpand + nolist + org + page + processor + radix + res + set + space + subtitle + title + variable + end + + CBLOCK + CONSTANT + DA + DATA + DB + DE + DT + DW + ENDC + ENDM + EQU + ERROR + ERRORLEVEL + EXITM + FILL + LIST + LOCAL + MACRO + MESSG + NOEXPAND + NOLIST + ORG + PAGE + PROCESSOR + RADIX + RES + SET + SPACE + SUBTITLE + TITLE + VARIABLE + END + + + + if + else + idef + ifndef + endif + while + include + endw + { + } + + + + addcf + b + clrc + clrz + setc + setz + movfw + skpc + skpz + skpnc + skpnz + subcf + tstf + + ADDCF + B + CLRC + CLRZ + SETC + SETZ + MOVFW + SKPC + SKPZ + SKPNC + SKPNZ + SUBCF + TSTF + + + + addlw + addwf + addwfc + andlw + andwf + bc + bcf + bn + bnc + bnov + bnz + bov + bra + bsf + btg + bz + btfsc + btfss + call + clrf + clrw + clrwdt + comf + cpfseq + cpfslt + cpfsgt + daw + decf + dcfsnz + decfsz + goto + incf + incfsz + infsnz + iorlw + iorwf + lfsr + movf + movff + movlb + movlw + movwf + mullw + mulwf + negf + nop + option + pop + push + rcall + reset + retfie + retlw + return + rlcf + rlf + rlncf + rrcf + rrf + rrncf + setf + sleep + subfwb + sublw + subwf + subwfb + swapf + tblrd + tblwt + tstfsz + xorlw + xorwf + + ADDLW + ADDWF + ADDWFC + ANDLW + ANDWF + BC + BCF + BN + BNC + BNOV + BNZ + BOV + BRA + BSF + BTG + BZ + BTFSC + BTFSS + CALL + CLRF + CLRW + CLRWDT + COMF + CPFSEQ + CPFSLT + CPFSGT + DAW + DCFSNZ + DECF + DECFSZ + GOTO + INCF + INCFSZ + INFSNZ + IORLW + IORWF + LFSR + MOVF + MOVFF + MOVLB + MOVLW + MOVWF + MULLW + MULWF + NEGF + NOP + OPTION + POP + PUSH + RCALL + RESET + RETFIE + RETLW + RETURN + RLCF + RLF + RLNCF + RRCF + RRF + RRNCF + SETF + SLEEP + SUBFWB + SUBLW + SUBWF + SUBWFB + SWAPF + TBLRD + TBLWT + TSTFSZ + XORLW + XORWF + + + + A + ACCESS + BANKED + W + F + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/pike.xml b/kate/data/pike.xml new file mode 100644 index 000000000..461b0c17b --- /dev/null +++ b/kate/data/pike.xml @@ -0,0 +1,121 @@ + + + + + + + break + case + class + continue + default + do + else + for + foreach + if + return + switch + while + + + array + float + function + int + mapping + mixed + multiset> + object + program + static + string + void + + + catch + gauge + sscanf + typeof + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/postscript.xml b/kate/data/postscript.xml new file mode 100644 index 000000000..b590db232 --- /dev/null +++ b/kate/data/postscript.xml @@ -0,0 +1,434 @@ + + + + + + abs + add + aload + anchorsearch + and + arc + arcn + arct + arcto + array + ashow + astore + awidthshow + begin + bind + bitshift + ceiling + charpath + clear + cleartomark + clip + clippath + closepath + concat + concatmatrix + copy + count + counttomark + currentcmykcolor + currentdash + currentdict + currentfile + currentfont + currentgray + currentgstate + currenthsbcolor + currentlinecap + currentlinejoin + currentlinewidth + currentmatrix + currentpoint + currentrgbcolor + currentshared + curveto + cvi + cvlit + cvn + cvr + cvrs + cvs + cvx + def + defineusername + dict + div + dtransform + dup + end + eoclip + eofill + eoviewclip + eq + exch + exec + exit + file + fill + findfont + flattenpath + floor + flush + flushfile + for + forall + ge + get + getinterval + grestore + gsave + gstate + gt + identmatrix + idiv + idtransform + if + ifelse + image + imagemask + index + ineofill + infill + initviewclip + inueofill + inufill + invertmatrix + itransform + known + le + length + lineto + load + loop + lt + makefont + matrix + maxlength + mod + moveto + mul + ne + neg + newpath + not + null + or + pathbbox + pathforall + pop + print + printobject + put + putinterval + rcurveto + read + readhexstring + readline + readstring + rectclip + rectfill + rectstroke + rectviewclip + repeat + restore + rlineto + rmoveto + roll + rotate + round + save + scale + scalefont + search + selectfont + setbbox + setcachedevice + setcachedevice2 + setcharwidth + setcmykcolor + setdash + setfont + setgray + setgstate + sethsbcolor + setlinecap + setlinejoin + setlinewidth + setmatrix + setrgbcolor + setshared + shareddict + show + showpage + stop + stopped + store + string + stringwidth + stroke + strokepath + sub + systemdict + token + transform + translate + truncate + type + uappend + ucache + ueofill + ufill + undef + upath + userdict + ustroke + viewclip + viewclippath + where + widthshow + write + writehexstring + writeobject + writestring + wtranslation + xor + xshow + xyshow + yshow + FontDirectory + SharedFontDirectory + Courier + Courier-Bold + Courier-BoldOblique + Courier-Oblique + Helvetica + Helvetica-Bold + Helvetica-BoldOblique + Helvetica-Oblique + Symbol + Times-Bold + Times-BoldItalic + Times-Italic + Times-Roman + execuserobject + currentcolor + currentcolorspace + currentglobal + execform + filter + findresource + globaldict + makepattern + setcolor + setcolorspace + setglobal + setpagedevice + setpattern + ISOLatin1Encoding + StandardEncoding + atan + banddevice + bytesavailable + cachestatus + closefile + colorimage + condition + copypage + cos + countdictstack + countexecstack + cshow + currentblackgeneration + currentcacheparams + currentcolorscreen + currentcolortransfer + currentcontext + currentflat + currenthalftone + currenthalftonephase + currentmiterlimit + currentobjectformat + currentpacking + currentscreen + currentstrokeadjust + currenttransfer + currentundercolorremoval + defaultmatrix + definefont + deletefile + detach + deviceinfo + dictstack + echo + erasepage + errordict + execstack + executeonly + exp + false + filenameforall + fileposition + fork + framedevice + grestoreall + handleerror + initclip + initgraphics + initmatrix + instroke + inustroke + join + kshow + ln + lock + log + mark + monitor + noaccess + notify + nulldevice + packedarray + quit + rand + rcheck + readonly + realtime + renamefile + renderbands + resetfile + reversepath + rootfont + rrand + run + scheck + setblackgeneration + setcachelimit + setcacheparams + setcolorscreen + setcolortransfer + setfileposition + setflat + sethalftone + sethalftonephase + setmiterlimit + setobjectformat + setpacking + setscreen + setstrokeadjust + settransfer + setucacheparams + setundercolorremoval + sin + sqrt + srand + stack + status + statusdict + true + ucachestatus + undefinefont + usertime + ustrokepath + version + vmreclaim + vmstatus + wait + wcheck + xcheck + yield + defineuserobject + undefineuserobject + UserObjects + cleardictstack + setvmthreshold + currentcolorrendering + currentdevparams + currentoverprint + currentpagedevice + currentsystemparams + currentuserparams + defineresource + findencoding + gcheck + glyphshow + languagelevel + product + pstack + resourceforall + resourcestatus + revision + serialnumber + setcolorrendering + setdevparams + setoverprint + setsystemparams + setuserparams + startjob + undefineresource + GlobalFontDirectory + ASCII85Decode + ASCII85Encode + ASCIIHexDecode + ASCIIHexEncode + CCITTFaxDecode + CCITTFaxEncode + DCTDecode + DCTEncode + LZWDecode + LZWEncode + NullEncode + RunLengthDecode + RunLengthEncode + SubFileDecode + CIEBasedA + CIEBasedABC + DeviceCMYK + DeviceGray + DeviceRGB + Indexed + Pattern + Separation + CIEBasedDEF + CIEBasedDEFG + DeviceN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/povray.xml b/kate/data/povray.xml new file mode 100644 index 000000000..b1c3ab711 --- /dev/null +++ b/kate/data/povray.xml @@ -0,0 +1,883 @@ + + + + + + + + + + aa_threshold + aa_level + absorption + abs + accuracy + acosh + acos + adaptive + adc_bailout + agate + agate_turb + all_intersections + all + alpha + always_sample + altitude + ambient_light + ambient + angle + aperture + append + arc_angle + area_light + array + ascii + asc + asinh + asin + assumed_gamma + atan2 + atanh + atan + average + background + bezier_spline + bicubic_patch + black_hole + blob + blue + blur_samples + bounded_by + boxed + box + bozo + brick_size + brick + brightness + brilliance + bumps + bump_map + bump_size + b_spline + camera + caustics + ceil + cells + charset + checker + chr + circular + clipped_by + clock_delta + clock_on + clock + color_map + colour_map + color + colour + component + composite + concat + cone + confidence + conic_sweep + contained_by + control0 + control1 + coords + cosh + cos + count + crackle + crand + cube + cubic_spline + cubic + cubic_wave + cylinder + cylindrical + defined + degrees + density_file + density_map + density + dents + df3 + difference + diffuse + dimensions + dimension_size + direction + disc + dispersion + dispersion_samples + distance_maximum + distance + dist_exp + div + double_illuminate + eccentricity + emission + error_bound + evaluate + exp + exponent + exterior + extinction + facets + face_indices + fade_colour + fade_color + fade_distance + fade_power + falloff_angle + falloff + false + file_exists + shadowless + filter + final_clock + final_frame + finish + fisheye + flatness + flip + floor + focal_point + fog_alt + fog_offset + fog + fog_type + form + frame_number + frequency + fresnel + function + gif + global_settings + gradient + granite + gray + gray_threshold + green + height_field + hexagon + hf_gray_16 + hierarchy + hollow + hypercomplex + image_width + image_height + initial_clock + initial_frame + interior_texture + iff + image_map + image_pattern + inside + inside_vector + interior + interpolate + intersection + intervals + int + inverse + ior + irid + irid_wavelength + isosurface + jitter + julia + julia_fractal + jpeg + lambda + lathe + leopard + light_group + light_source + linear_spline + linear_sweep + ln + load_file + location + log + looks_like + look_at + low_error_factor + magnet + major_radius + mandel + map_type + marble + material_map + material + matrix + max_extent + max_gradient + max_intersections + max_iteration + max_sample + max + max_trace_level + max_trace + media_attenuation + media_interaction + media + merge + mesh2 + mesh + metallic + method + metric + minimum_reuse + min_extent + min + mod + mortar + natural_spline + nearest_count + normal + normal_indices + normal_map + normal_vectors + no_image + no_reflection + no_shadow + no + number_of_waves + object + octaves + offset + off + omega + omnimax + once + onion + on + open + orientation + orient + orthographic + panoramic + parallel + parametric + pattern + perspective + pgm + phase + phong_size + phong + pigment_map + pigment + pi + planar + plane + png + point_at + polygon + poly + poly_wave + pot + pow + ppm + precision + precompute + pretrace_start + pretrace_end + prism + prod + projected_through + pwr + quadratic_spline + quadric + quartic + quaternion + quick_color + quick_colour + quilted + radial + radians + radiosity + radius + rainbow + ramp_wave + rand + range + ratio + reciprocal + recursion_limit + red + reflection_exponent + reflection + refraction + repeat + rgbft + rgbf + rgbt + rgb + right + ripples + rotate + roughness + samples + save_file + scale + scallop_wave + scattering + seed + select + sine_wave + sinh + sin + size + sky_sphere + sky + slice + slope_map + slope + smooth + smooth_triangle + solid + sor + specular + sphere_sweep + sphere + spherical + spiral1 + spiral2 + spline + spotlight + spotted + sqrt + sqr + statistics + strcmp + strength + strlen + strlwr + strupr + str + sturm + substr + sum + superellipsoid + sys + tanh + tan + texture_list + texture_map + texture + text + tga + thickness + threshold + tiff + tightness + tile2 + tiles + normal + tolerance + toroidal + torus + trace + transform + translate + transmit + triangle + triangle_wave + true + ttf + turbulence + turb_depth + type + t + ultra_wide_angle + union + up + use_alpha + use_color + use_colour + use_index + utf8 + uv_indices + uv_mapping + uv_vectors + u_steps + u + val + variance + vaxis_rotate + vcross + vdot + vertex_vectors + vlength + vnormalize + vrotate + vstr + vturbulence + v_steps + v + warning + warp + water_level + waves + while + width + wood + wrinkles + write + x + yes + y + z + photons + steps + pass_through + collect + autostop + gather + split_union + expand_thresholds + spacing + global + target + conserve_energy + cutaway_textures + pigment_pattern + no_bump_scale + global_lights + internal + noise_generator + + + + bicubic_patch + blob + box + cone + cubic + cylinder + difference + disc + height_field + intersection + isosurface + julia_fractal + lathe + light_source + merge + mesh + mesh2 + object + parametric + plane + poly + polygon + prism + quadric + quartic + smooth_triangle + sor + sphere + sphere_sweep + superellipsoid + text + torus + triangle + union + + + + aa_threshold + aa_level + absorption + agate + agate_turb + ambient + average + black_hole + blue + boxed + brick_size + brick + brilliance + bumps + bump_map + bump_size + caustics + cells + checker + color_map + colour_map + color + colour + conserve_energy + control0 + control1 + crackle + crand + cubic_wave + cylindrical + density_file + density_map + density + dents + diffuse + dist_exp + double_illuminate + eccentricity + emission + exponent + exterior + extinction + facets + fade_colour + fade_color + fade_distance + fade_power + filter + finish + form + frequency + fresnel + gradient + granite + gray + green + hexagon + hypercomplex + interior_texture + image_map + image_pattern + interior + interpolate + intervals + ior + irid + irid_wavelength + julia + lambda + leopard + magnet + mandel + map_type + marble + material_map + material + media + metallic + method + metric + mortar + normal + normal_map + number_of_waves + octaves + omega + once + onion + orientation + phase + phong_size + phong + pigment_map + pigment + planar + quaternion + quick_color + quick_colour + quilted + radial + ramp_wave + red + reflection_exponent + reflection + repeat + rgbft + rgbf + rgbt + rgb + ripples + roughness + samples + scallop_wave + scattering + sine_wave + slope_map + slope + solid + specular + spherical + spiral1 + spiral2 + spotted + texture_list + texture_map + texture + tile2 + tiles + normal + toroidal + transmit + triangle_wave + turbulence + turb_depth + use_alpha + use_color + use_colour + use_index + uv_mapping + warp + waves + wood + wrinkles + cutaway_textures + pigment_pattern + no_bump_scale + + + + matrix + rotate + scale + translate + transform + + + + df3 + gif + iff + jpeg + pgm + png + pot + ppm + tga + tiff + ttf + + + + clock + clock_delta + clock_on + final_clock + final_frame + frame_number + image_height + image_width + initial_clock + initial_frame + t + u + v + x + y + z + + + + false + no + off + on + pi + true + yes + + + + abs + acos + acosh + asc + asin + asinh + atan + atan2 + atanh + ceil + chr + concat + cos + cosh + cube + defined + degress + dimension_size + dimensions + div + exp + file_exists + floor + inside + int + ln + log + max + min + mod + pow + prod + pwr + radians + rand + seed + select + sin + sinh + sqrt + str + strcmp + strlen + strlwr + strupr + substr + sum + tan + tanh + trace + val + vaxis_rotate + vcross + vdot + vlength + vnormalize + vrotate + vstr + vturbulence + + + + #debug + #default + #else + #end + #error + #fclose + #fopen + #if + #ifdef + #ifndef + #include + #range + #read + #render + #statistics + #switch + #undef + #version + #warning + #while + #write + + + + FIXME + TODO + ### + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/progress.xml b/kate/data/progress.xml new file mode 100644 index 000000000..b281e02dd --- /dev/null +++ b/kate/data/progress.xml @@ -0,0 +1,1608 @@ + + + + + + + + CHAR + CHARACTER + COM-HANDLE + DECI + DECIMAL + DATE + INTE + INTEGER + ROWID + RECID + LOGI + LONGCHAR + LOGICAL + HANDLE + WIDGET-HANDLE + RAW + LONG + SHORT + BLOB + CLOB + LONGCHAR + DATETIME + DATETIME-TZ + TEMP-TABLE + BUFFER + STREAM + SAX-WRITER + MEMPTR + + + + AND + OR + NOT + BEGINS + MATCHES + MODULO + EQ + NE + LT + GT + GE + LE + FALSE + TRUE + YES + NO + + + + OUT + BATCH-MODE + FILE-NAME + GLOBAL-DEFINE + LINE-NUMBER + OPSYS + ENDIF + SCOPED-DEFINE + SEQUENCE + UNDEFINE + WINDOW-SYSTEM + ANALYZE-RESUME + ANALYZE-SUSPEND + WEBSTREAM + + + + AS + WORD-INDEX + LIKE + ALERT-BOX + AT + COLOR + COMBO-BOX + EDITING + EDITOR + FORMAT + FRAME + IMAGE + ENDKEY + ERROR + QUIT + STOP + PRESELECT + QUERY-TUNING + RADIO-SET + RECORD + SELECTION-LIST + SIZE + SLIDER + TRIGGER + WIDGET + VIEW-AS + NO-UNDO + NO-ERROR + OUT + WHERE + GLOBAL + SHARED + DEFINED + EXCLUSIVE-LOCK + SHARE-LOCK + NO-LOCK + EACH + FIRST + PREV + LAST + SKIP + FORWARD + UNIQUE + UNFORMATTED + APPEND + IN + OF + BEFORE-HIDE + NO-BOX + NO-UNDERLINE + KEEP-TAB-ORDER + UNBUFFERED + BINARY + NO-CONVERT + CONVERT + TARGET + NO-FILL + BY + NO-LABEL + GROUP + BREAK + COLON-ALIGNED + WITH + NO-LABELS + NO-PAUSE + NO-MESSAGE + NO-ECHO + NO-MAP + PRIVATE + PUBLIC + PROTECTED + + + + output-content-type + get-value + get-cgi + get-field + html-encode + url-encode + ABSOLUTE + ACCUM + ADD-INTERVAL + ALIAS + AMBIGUOUS + ASC + AVAILABLE + BASE64-DECODE + BASE64-ENCODE + CAN-DO + CAN-FIND + CAN-QUERY + CAN-SET + CAPS + CHR + CODEPAGE-CONVERT + COMPARE + CONNECTED + COUNT-OF + CURRENT-CHANGED + CURRENT-LANGUAGE + CURRENT-RESULT-ROW + CURRENT-VALUE + DATASERVERS + DATA-SOURCE-MODIFIED + DATE + DATETIME + DATETIME-TZ + DAY + DBCODEPAGE + DBCOLLATION + DBNAME + DBPARAM + DBRESTRICTIONS + DBTASKID + DBTYPE + DBVERSION + DECIMAL + DECRYPT + DYNAMIC-CURRENT-VALUE + DYNAMIC-FUNCTION + DYNAMIC-NEXT-VALUE + ENCODE + ENCRYPT + ENTERED + ENTRY + ERROR + ETIME + EXP + EXTENT + FILL + FIRST + FIRST-OF + FIX-CODEPAGE + FRAME-COL + FRAME-DB + FRAME-DOWN + FRAME-FIELD + FRAME-FILE + FRAME-INDEX + FRAME-LINE + FRAME-NAME + FRAME-ROW + FRAME-VALUE + GATEWAYS + GENERATE-PBE-KEY + GENERATE-PBE-SALT + GENERATE-RANDOM-KEY + GET-BITS + GET-BYTE + GET-BYTE-ORDER + GET-BYTES + GET-CODEPAGE + GET-CODEPAGES + GET-COLLATION + GET-COLLATIONS + GET-DOUBLE + GET-FLOAT + GET-LONG + GET-POINTER-VALUE + GET-SHORT + GET-SIZE + GET-STRING + GET-UNSIGNED-SHORT + GO-PENDING + INDEX + INTEGER + INTERVAL + IS-ATTR-SPACE + IS-CODEPAGE-FIXED + IS-COLUMN-CODEPAGE + IS-LEAD-BYTE + ISO-DATE + KBLABEL + KEYCODE + KEYFUNCTION + KEYLABEL + KEYWORD + KEYWORD-ALL + LAST + LASTKEY + LAST-OF + LC + LDBNAME + LEFT-TRIM + LENGTH + LIBRARY + LINE-COUNTER + LIST-EVENTS + LIST-QUERY-ATTRS + LIST-SET-ATTRS + LIST-WIDGETS + LOCKED + LOG + LOGICAL + LOOKUP + MAXIMUM + MD5-DIGEST + MEMBER + MESSAGE-LINES + MINIMUM + MONTH + MTIME + NEW + NEXT-VALUE + NORMALIZE + NOT ENTERED + NOW + NUM-ALIASES + NUM-DBS + NUM-ENTRIES + NUM-RESULTS + OPSYS + OS-DRIVES + OS-ERROR + OS-GETENV + PAGE-NUMBER + PAGE-SIZE + PDBNAME + PROC-HANDLE + PROC-STATUS + PROGRAM-NAME + PROGRESS + PROMSGS + PROPATH + PROVERSION + QUERY-OFF-END + QUOTER + RANDOM + RAW + RECID + RECORD-LENGTH + REJECTED + REPLACE + RETRY + RETURN-VALUE + RGB-VALUE + RIGHT-TRIM + R-INDEX + ROUND + ROWID + ROW-STATE + SCREEN-LINES + SDBNAME + SEARCH + SEEK + SETUSERID + SHA1-DIGEST + SQRT + SSL-SERVER-NAME + STRING + SUBSTITUTE + SUBSTRING + SUPER + TERMINAL + TIME + TIMEZONE + TODAY + TO-ROWID + TRANSACTION + TRIM + TRUNCATE + USERID + VALID-EVENT + VALID-HANDLE + WEEKDAY + WIDGET-HANDLE + YEAR + + + + IF + THEN + ELSE + WHEN + OTHERWISE + ACCUMULATE + APPLY + ASSIGN + BELL + BUFFER-COMPARE + BUFFER-COPY + CHOOSE + CLEAR + CLOSE + QUERY + STORED-PROCEDURE + COLOR + COMPILE + CONNECT + COPY-LOB + CREATE + ALIAS + BROWSE + BUFFER + CALL + DATABASE + DATASET + DATA-SOURCE + QUERY + SAX-READER + SERVER + SERVER-SOCKET + SOAP-HEADER + SOAP-HEADER-ENTRYREF + SOCKET + TEMP-TABLE + WIDGET + WIDGET-POOL + X-DOCUMENT + X-NODEREF + CURRENT-LANGUAGE + CURRENT-VALUE + DDE + ADVISE + EXECUTE + GET + INITIATE + REQUEST + SEND + TERMINATE + DEF + DEFINE + VAR + VARIABLE + BROWSE + BUFFER + BUTTON + DATASET + DATA-SOURCE + FRAME + IMAGE + MENU + PARAM + PARAMETER + QUERY + RECTANGLE + STREAM + SUB-MENU + TEMP-TABLE + VARIABLE + WORK-TABLE + WORKFILE + DELETE + ALIAS + OBJECT + WIDGET + WIDGET-POOL + DICTIONARY + DISABLE + TRIGGERS + DISCONNECT + DISPLAY + DOS + DOWN + DYNAMIC-CURRENT-VALUE + EMPTY + TEMP-TABLE + ENABLE + ENTRY + EXPORT + FIND + FORM + FRAME-VALUE + GET + GET-KEY-VALUE + HIDE + IMPORT + INPUT + CLEAR + CLOSE + FROM + TO + THROUGH + INPUT-OUTPUT + THROUGH + INSERT + LEAVE + LENGTH + LOAD + LOAD-PICTURE + MESSAGE + NEXT + NEXT-PROMPT + QUERY + OPEN + OS-APPEND + OS-COMMAND + OS-COPY + OS-CREATE-DIR + OS-DELETE + OS-RENAME + OUTPUT + OVERLAY + PAGE + PAUSE + PROCESS + EVENTS + PROMPT-FOR + PROMSGS + PROPATH + PUBLISH + CURSOR + PUT + SCREEN + PUT-BITS + PUT-BYTE + PUT-BYTES + PUT-DOUBLE + PUT-FLOAT + PUT-KEY-VALUE + PUT-LONG + PUT-SHORT + PUT-STRING + PUT-UNSIGNED-SHORT + QUIT + RAW + RAW-TRANSFER + READKEY + RELEASE + EXTERNAL + OBJECT + REPOSITION + RETURN + RETURNS + RUN + STORED-PROCEDURE + SUPER + SAVE + CACHE + SEEK + SET + SET-BYTE-ORDER + SET-POINTER-VALUE + SET-SIZE + SCROLL + SHOW-STATS + STATUS + STOP + SUBSCRIBE + SUBSTRING + COLOR + SYSTEM-DIALOG + FONT + GET-DIR + GET-FILE + PRINTER-SETUP + SYSTEM-HELP + TERMINAL + TRANSACTION-MODE + AUTOMATIC + TRIGGER + UNDERLINE + UNDO + UNIX + UNLOAD + UNSUBSCRIBE + UP + UPDATE + USE + VALIDATE + VIEW + WAIT-FOR + + + + BROWSE + BUTTON + COMBO-BOX + CONTROL-FRAME + DIALOG-BOX + EDITOR + FIELD-GROUP + FILL-IN + FRAME + IMAGE + LITERAL + MENU + MENU-ITEM + RADIO-SET + RECTANGLE + SELECTION-LIST + SLIDER + SUB-MENU + TEXT + TOGGLE-BOX + WINDOW + + + + ACTIVE-WINDOW + BUFFER + BUFFER-FIELD + CALL + CLIPBOARD + CODEBASE-LOCATOR + COLOR-TABLE + COM-SELF + COMPILER + CURRENT-WINDOW + DATA-RELATION + DATE-SOURCE + DEBUGGER + DEFAULT-WINDOW + ERROR-STATUS + FILE-INFO + FIELD + FOCUS + FONT-TABLE + LAST-EVENT + LOG-MANAGER + PRODATASET + QUERY + RCODE-INFO + SAX-ATTRIBUTES + SAX-READER + SELF + SERVER SOCKET + SESSION + SOAP-FAULT + SOAP-FAULT-DETAIL + SOAP-HEADER + SOAP-HEADER-ENTRYREF + SOCKET + SOURCE-PROCEDURE + TARGET-PROCEDURE + TEMP-TABLE + THIS-PROCEDURE + TRANSACTION + WEB-CONTEXT + X-DOCUMENT + X-NODEREF + + + + CONTROL-NAME + CONTROLS + HEIGHT + HONORPROKEYS + HONORRETURNKEY + LEFT + TOP + WIDTH + TAG + + + + ACCELERATOR + ACTIVE + ACTOR + ADM-DATA + AFTER-BUFFER + AFTER-ROWID + AFTER-TABLE + ALLOW-COLUMN-SEARCHING + ALWAYS-ON-TOP + AMBIGUOUS + APPL-ALERT-BOXES + APPSERVER-INFO + APPSERVER-PASSWORD + APPSERVER-USERID + ASYNCHRONOUS + ASYNC-REQUEST-COUNT + ASYNC-REQUEST-HANDLE + ATTRIBUTE-NAMES + ATTR-SPACE + AUTO-COMPLETION + AUTO-DELETE + AUTO-ENDKEY + AUTO-GO + AUTO-INDENT + AUTO-RESIZE + AUTO-RETURN + AUTO-VALIDATE + AUTO-ZAP + AVAILABLE + AVAILABLE-FORMATS + BACKGROUND + BASE-ADE + BASIC-LOGGING + BATCH-MODE + BEFORE-BUFFER + BEFORE-ROWID + BEFORE-TABLE + BGCOLOR + BLANK + BLOCK-ITERATION-DISPLAY + BORDER-BOTTOM-CHARS + BORDER-BOTTOM-PIXELS + BORDER-LEFT-CHARS + BORDER-LEFT-PIXELS + BORDER-RIGHT-CHARS + BORDER-RIGHT-PIXELS + BORDER-TOP-CHARS + BORDER-TOP-PIXELS + BOX + BOX-SELECTABLE + BUFFER-CHARS + BUFFER-VALUE + BYTES-READ + BYTES-WRITTEN + CACHE + CALL-NAME + CALL-TYPE + BUFFER-FIELD + BUFFER-HANDLE + BUFFER-LINES + BUFFER-NAME + CANCEL-BUTTON + CANCELLED + CAN-CREATE + CAN-DELETE + CAN-READ + CAN-WRITE + CAREFUL-PAINT + CASE-SENSITIVE + CENTERED + CHARSET + CHECKED + CHILD-BUFFER + CHILD-NUM + CLIENT-CONNECTION-ID + CLIENT-TYPE + CODE + CODEPAGE + COLUMN + COLUMN-BGCOLOR + COLUMN-DCOLOR + COLUMN-FGCOLOR + COLUMN-FONT + COLUMN-LABEL + COLUMN-MOVABLE + COLUMN-PFCOLOR + COLUMN-READ-ONLY + COLUMN-RESIZABLE + COLUMN-SCROLLING + COM-HANDLE + COMPLETE + CONTEXT-HELP + CONTEXT-HELP-FILE + CONTEXT-HELP-ID + CONTROL-BOX + CONVERT-D-COLORS + CPCASE + CPCOLL + CPINTERNAL + CPLOG + CPPRINT + CPRCODEIN + CPRCODEOUT + CPSTREAM + CPTERM + CRC-VALUE + CURRENT-CHANGED + CURRENT-COLUMN + CURRENT-ITERATION + CURRENT-RESULT-ROW + CURRENT-ROW-MODIFIED + CURRENT-WINDOW + CURSOR-CHAR + CURSOR-LINE + CURSOR-OFFSET + DATA-ENTRY-RETURN + DATA-SOURCE + DATA-TYPE + DATASET + DATE-FORMAT + DBNAME + DB-REFERENCES + DCOLOR + DDE-ERROR + DDE-ID + DDE-ITEM + DDE-NAME + DDE-TOPIC + DEBLANK + DEBUG-ALERT + DECIMALS + DEFAULT + DEFAULT-BUFFER-HANDLE + DEFAULT-BUTTON + DEFAULT-COMMIT + DELIMITER + DISABLE-AUTO-ZAP + DISPLAY-TIMEZONE + DISPLAY-TYPE + DOWN + DRAG-ENABLED + DROP-TARGET + DYNAMIC + EDGE-CHARS + EDGE-PIXELS + EDIT-CAN-PASTE + EDIT-CAN-UNDO + EMPTY + ENCODING + END-USER-PROMPT + ENTRY-TYPES-LIST + ERROR + ERROR-COLUMN + ERROR-OBJECT-DETAIL + ERROR-ROW + ERROR-STRING + EVENT-PROCEDURE + EVENT-PROCEDURE-CONTEXT + EVENT-TYPE + EXPAND + EXPANDABLE + EXTENT + FGCOLOR + FILE-CREATE-DATE + FILE-CREATE-TIME + FILE-MOD-DATE + FILE-MOD-TIME + FILE-NAME + FILE-OFFSET + FILE-SIZE + FILE-TYPE + FILLED + FILL-MODE + FILL-WHERE-STRING + FIRST-ASYNC-REQUEST + FIRST-BUFFER + FIRST-CHILD + FIRST-COLUMN + FIRST-DATASET + FIRST-DATA-SOURCE + FIRST-PROCEDURE + FIRST-QUERY + FIRST-SERVER + FIRST-SERVER-SOCKET + FIRST-SOCKET + FIRST-TAB-ITEM + FIT-LAST-COLUMN + FLAT-BUTTON + FOCUSED-ROW + FOCUSED-ROW-SELECTED + FONT + FOREGROUND + FORMAT + FORWARD-ONLY + FRAME + FRAME-COL + FRAME-NAME + FRAME-ROW + FRAME-SPACING + FRAME-X + FRAME-Y + FREQUENCY + FULL-HEIGHT-CHARS + FULL-HEIGHT-PIXELS + FULL-PATHNAME + FULL-WIDTH-CHARS + FULL-WIDTH-PIXELS + GRAPHIC-EDGE + GRID-FACTOR-HORIZONTAL + GRID-FACTOR-VERTICAL + GRID-SNAP + GRID-UNIT-HEIGHT-CHARS + GRID-UNIT-HEIGHT-PIXELS + GRID-UNIT-WIDTH-CHARS + GRID-UNIT-WIDTH-PIXELS + GRID-VISIBLE + HANDLER + HAS-LOBS + HAS-RECORDS + HEIGHT-CHARS + HEIGHT-PIXELS + HELP + HIDDEN + HORIZONTAL + HTML-CHARSET + HWND + ICFPARAMETER + ICON + IGNORE-CURRENT-MODIFIED + IMAGE + IMAGE-DOWN + IMAGE-INSENSITIVE + IMAGE-UP + IMMEDIATE-DISPLAY + INDEX + INDEX-INFORMATION + INIT + INITIAL + INNER-CHARS + INNER-LINES + INPUT-VALUE + INSTANTIATING-PROCEDURE + INTERNAL-ENTRIES + IN-HANDLE + IS-OPEN + IS-PARAMETER-SET + ITEMS-PER-ROW + KEEP-CONNECTION-OPEN + KEEP-FRAME-Z-ORDER + KEEP-SECURITY-CACHE + KEY + LABEL + LABEL-BGCOLOR + LABEL-DCOLOR + LABEL-FGCOLOR + LABEL-FONT + LABELS + LANGUAGES + LARGE + LARGE-TO-SMALL + LAST-ASYNC-REQUEST + LAST-CHILD + LAST-PROCEDURE + LAST-SERVER + LAST-SERVER-SOCKET + LAST-SOCKET + LAST-TAB-ITEM + LENGTH + LINE + LIST-ITEM-PAIRS + LIST-ITEMS + LITERAL-QUESTION + LOCAL-HOST + LOCAL-NAME + LOCAL-PORT + LOCATOR-COLUMN-NUMBER + LOCATOR-LINE-NUMBER + LOCATOR-PUBLIC-ID + LOCATOR-SYSTEM-ID + LOCATOR-TYPE + LOCKED + LOG-ENTRY-TYPES + LOG-THRESHOLD + LOGFILE-NAME + LOGGING-LEVEL + MANDATORY + MANUAL-HIGHLIGHT + MAX-BUTTON + MAX-CHARS + MAX-DATA-GUESS + MAX-HEIGHT-CHARS + MAX-HEIGHT-PIXELS + MAX-VALUE + MAX-WIDTH-CHARS + MAX-WIDTH-PIXELS + MD-VALUE + MENU-BAR + MENU-KEY + MENU-MOUSE + MESSAGE-AREA + MESSAGE-AREA-FONT + MIN-BUTTON + MIN-COLUMN-WIDTH-CHARS + MIN-COLUMN-WIDTH-PIXELS + MIN-HEIGHT-CHARS + MIN-HEIGHT-PIXELS + MIN-SCHEMA-MARSHAL + MIN-VALUE + MIN-WIDTH-CHARS + MIN-WIDTH-PIXELS + MODIFIED + MOUSE-POINTER + MOVABLE + MULTIPLE + MULTITASKING-INTERVAL + MUST-UNDERSTAND + NAMESPACE-PREFIX + NAMESPACE-URI + NEEDS-APPSERVER-PROMPT + NEEDS-PROMPT + NEW + NEW-ROW + NEXT-COLUMN + NEXT-SIBLING + NEXT-TAB-ITEM + NO-CURRENT-VALUE + NO-EMPTY-SPACE + NO-FOCUS + NO-SCHEMA-MARSHAL + NO-VALIDATE + NODE-VALUE + NUM-BUFFERS + NUM-BUTTONS + NUM-CHILD-RELATIONS + NUM-CHILDREN + NUM-COLUMNS + NUM-DROPPED-FILES + NUM-ENTRIES + NUM-FIELDS + NUM-FORMATS + NUM-HEADER-ENTRIES + NUM-ITEMS + NUM-ITERATIONS + NUM-LINES + NUM-LOCKED-COLUMNS + NUM-LOG-FILES + NUM-MESSAGES + NUM-PARAMETERS + NUM-RELATIONS + NUM-REPLACED + NUM-RESULTS + NUM-SELECTED-ROWS + NUM-SELECTED-WIDGETS + NUM-SOURCE-BUFFERS + NUM-TABS + NUM-TO-RETAIN + NUM-TOP-BUFFERS + NUM-VISIBLE-COLUMNS + NUMERIC-DECIMAL-POINT + NUMERIC-FORMAT + NUMERIC-SEPARATOR + ON-FRAME-BORDER + ORIGIN-HANDLE + ORIGIN-ROWID + OVERLAY + OWNER + OWNER-DOCUMENT + PAGE-BOTTOM + PAGE-TOP + PARAMETER + PARENT + PARENT-BUFFER + PARENT-RELATION + PARSE-STATUS + PASSWORD-FIELD + PATHNAME + PERSISTENT + PERSISTENT-CACHE-DISABLED + PERSISTENT-PROCEDURE + PFCOLOR + PIXELS-PER-COLUMN + PIXELS-PER-ROW + POPUP-MENU + POPUP-ONLY + POSITION + PREPARED + PREPARE-STRING + PREV-COLUMN + PREV-SIBLING + PREV-TAB-ITEM + PRIMARY + PRINTER-CONTROL-HANDLE + PRINTER-HDC + PRINTER-NAME + PRINTER-PORT + PRIVATE-DATA + PROCEDURE-NAME + PROGRESS-SOURCE + PROXY + PROXY-PASSWORD + PROXY-USERID + PUBLIC-ID + PUBLISHED-EVENTS + QUERY + QUERY-OFF-END + QUIT + RADIO-BUTTONS + READ-ONLY + RECID + RECORD-LENGTH + REFRESHABLE + REJECTED + RELATION-FIELDS + RELATIONS-ACTIVE + REMOTE + REMOTE-HOST + REMOTE-PORT + REPOSITION + RESIZABLE + RESIZE + RETAIN-SHAPE + RETURN-INSERTED + RETURN-VALUE + RETURN-VALUE-DATA-TYPE + ROW + COL + ROW-HEIGHT-CHARS + ROW-HEIGHT-PIXELS + ROW-STATE + ROWID + ROW-MARKERS + ROW-RESIZABLE + SAVE-WHERE-STRING + SCHEMA-CHANGE + SCHEMA-PATH + SCREEN-LINES + SCREEN-VALUE + SCROLL-BARS + SCROLLABLE + SCROLLBAR-HORIZONTAL + SCROLLBAR-VERTICAL + SELECTABLE + SELECTED + SELECTION-END + SELECTION-START + SELECTION-TEXT + SENSITIVE + SEPARATORS + SEPARATOR-FGCOLOR + SERVER + SERVER-CONNECTION-BOUND + SERVER-CONNECTION-BOUND-REQUEST + SERVER-CONNECTION-CONTEXT + SERVER-CONNECTION-ID + SERVER-OPERATING-MODE + SHOW-IN-TASKBAR + SIDE-LABEL-HANDLE + SIDE-LABELS + SKIP-DELETED-RECORD + SMALL-ICON + SMALL-TITLE + SOAP-FAULT-ACTOR + SOAP-FAULT-CODE + SOAP-FAULT-DETAIL + SOAP-FAULT-STRING + SORT + STARTUP-PARAMETERS + STATUS-AREA + STATUS-AREA-FONT + STOP + STOPPED + STREAM + STRETCH-TO-FIT + STRING-VALUE + SUBTYPE + SUPER-PROCEDURES + SUPPRESS-NAMESPACE-PROCESSING + SUPPRESS-WARNINGS + SYSTEM-ALERT-BOXES + SYSTEM-ID + TAB-POSITION + TAB-STOP + TABLE + TABLE-CRC-LIST + TABLE-HANDLE + TABLE-LIST + TABLE-NUMBER + TEMP-DIRECTORY + TEXT-SELECTED + THREE-D + TIC-MARKS + TIME-SOURCE + TITLE + TITLE-BGCOLOR + TITLE-DCOLOR + TITLE-FGCOLOR + TITLE-FONT + TOGGLE-BOX + TOOLTIP + TOOLTIPS + TOP-ONLY + TRACKING-CHANGES + TRANSACTION + TRANSPARENT + TRANS-INIT-PROCEDURE + TYPE + UNDO + UNIQUE-ID + UNIQUE-MATCH + URL + URL-PASSWORD + URL-USERID + DISPLAY + VALIDATE-EXPRESSION + VALIDATE-MESSAGE + VALIDATION-ENABLED + VALUE + VIEW-FIRST-COLUMN-ON-REOPEN + VIRTUAL-HEIGHT + VIRTUAL-WIDTH + VIRTUAL-HEIGHT-CHARS + VIRTUAL-HEIGHT-PIXELS + VIRTUAL-WIDTH-CHARS + VIRTUAL-WIDTH-PIXELS + VISIBLE + WARNING + WHERE-STRING + WIDGET-ENTER + WIDGET-LEAVE + WIDTH-CHARS + WIDTH-PIXELS + WINDOW + WINDOW-STATE + WINDOW-SYSTEM + WORD-WRAP + WORK-AREA-HEIGHT-PIXELS + WORK-AREA-WIDTH-PIXELS + WORK-AREA-X + WORK-AREA-Y + X + XML-SCHEMA-PATH + XML-SUPPRESS-NAMESPACE-PROCESSING + Y + YEAR-OFFSET + WRITE-XMLSCHEMA + WRITE-XML + READ-XML + NESTED + XML-DATA-TYPE + XML-NODE-TYPE + FORMATTED + SET-OUTPUT-DESTINATION + START-DOCUMENT + START-ELEMENT + WRITE-CHARACTERS + END-ELEMENT + END-DOCUMENT + WRITE-DATA-ELEMENT + INSERT-ATTRIBUTE + + + + + ACCEPT-CHANGES + ACCEPT-ROW-CHANGES + ADD-BUFFER + ADD-CALC-COLUMN + ADD-COLUMNS-FROM + ADD-EVENTS-PROCEDURE + ADD-FIELDS-FROM + ADD-FIRST + ADD-HEADER-ENTRY + ADD-INDEX-FIELD + ADD-LAST + ADD-LIKE-COLUMN + ADD-LIKE-FIELD + ADD-LIKE-INDEX + ADD-NEW-FIELD + ADD-NEW-INDEX + ADD-RELATION + ADD-SOURCE-BUFFER + ADD-SUPER-PROCEDURE + APPEND-CHILD + APPLY-CALLBACK + ATTACH-DATA-SOURCE + BUFFER-COMPARE + BUFFER-COPY + BUFFER-CREATE + BUFFER-DELETE + BUFFER-FIELD + BUFFER-RELEASE + BUFFER-VALIDATE + CANCEL-BREAK + CANCEL-REQUESTS + CLEAR + CLEAR-SELECTION + CLONE-NODE + CONNECT + CONNECTED + CONVERT-TO-OFFSET + CREATE-LIKE + CREATE-NODE + CREATE-NODE-NAMESPACE + CREATE-RESULT-LIST-ENTRY + DEBUG + DELETE + DELETE-CHAR + DELETE-CURRENT-ROW + DELETE-HEADER-ENTRY + DELETE-LINE + DELETE-NODE + DELETE-RESULT-LIST-ENTRY + DELETE-SELECTED-ROW + DELETE-SELECTED-ROWS + DESELECT-FOCUSED-ROW + DESELECT-ROWS + DESELECT-SELECTED-ROW + DETACH-DATA-SOURCE + DISABLE + DISABLE-CONNECTIONS + DISABLE-DUMP-TRIGGERS + DISABLE-LOAD-TRIGGERS + DISCONNECT + DISPLAY-MESSAGE + DUMP-LOGGING-NOW + EDIT-CLEAR + EDIT-COPY + EDIT-CUT + EDIT-PASTE + EDIT-UNDO + EMPTY-DATASET + EMPTY-TEMP-TABLE + ENABLE + ENABLE-CONNECTIONS + ENABLE-EVENTS + END-FILE-DROP + ENTRY + EXPORT + FETCH-SELECTED-ROW + FILL + FIND-BY-ROWID + FIND-CURRENT + FIND-FIRST + FIND-LAST + FIND-UNIQUE + GET-ATTRIBUTE + GET-ATTRIBUTE-NODE + GET-BLUE-VALUE + GET-BROWSE-COLUMN + GET-BUFFER-HANDLE + GET-BYTES-AVAILABLE + GET-CHANGES + GET-CHILD + GET-CHILD-RELATION + GET-CURRENT + GET-DATASET-BUFFER + GET-DOCUMENT-ELEMENT + GET-DROPPED-FILE + GET-DYNAMIC + GET-FIRST + GET-GREEN-VALUE + GET-HEADER-ENTRY + GET-INDEX-BY-NAMESPACE-NAME + GET-INDEX-BY-QNAME + GET-ITERATION + GET-LAST + GET-LOCALNAME-BY-INDEX + GET-MESSAGE + GET-NEXT + GET-NODE + GET-NUMBER + GET-PARENT + GET-PREV + GET-PRINTERS + GET-QNAME-BY-INDEX + GET-RED-VALUE + GET-RELATION + GET-REPOSITIONED-ROW + GET-RGB-VALUE + GET-SELECTED-WIDGET + GET-SERIALIZED + GET-SIGNATURE + GET-SOCKET-OPTION + GET-SOURCE-BUFFER + GET-TAB-ITEM + GET-TEXT-HEIGHT-CHARS + GET-TEXT-HEIGHT-PIXELS + GET-TEXT-WIDTH-CHARS + GET-TEXT-WIDTH-PIXELS + GET-TOP-BUFFER + GET-TYPE-BY-INDEX + GET-TYPE-BY-NAMESPACE-NAME + GET-TYPE-BY-QNAME + GET-URI-BY-INDEX + GET-VALUE-BY-INDEX + GET-VALUE-BY-NAMESPACE-NAME + GET-VALUE-BY-QNAME + GET-WAIT-STATE + IMPORT-NODE + INDEX-INFORMATION + INITIALIZE-DOCUMENT-TYPE + INITIATE + INSERT + INSERT-BACKTAB + INSERT-BEFORE + INSERT-FILE + INSERT-ROW + INSERT-STRING + INSERT-TAB + INVOKE + IS-ROW-SELECTED + IS-SELECTED + LOAD + LoadControls + LOAD-ICON + LOAD-IMAGE + LOAD-IMAGE-DOWN + LOAD-IMAGE-INSENSITIVE + LOAD-IMAGE-UP + LOAD-MOUSE-POINTER + LOAD-SMALL-ICON + LONGCHAR-TO-NODE-VALUE + LOOKUP + MEMPTR-TO-NODE-VALUE + MERGE-CHANGES + MERGE-ROW-CHANGES + MOVE-AFTER-TAB-ITEM + MOVE-BEFORE-TAB-ITEM + MOVE-COLUMN + MOVE-TO-BOTTOM + MOVE-TO-EOF + MOVE-TO-TOP + NODE-VALUE-TO-LONGCHAR + NODE-VALUE-TO-MEMPTR + NORMALIZE + QUERY-CLOSE + QUERY-OPEN + QUERY-PREPARE + RAW-TRANSFER + READ + READ-FILE + REFRESH + REJECT-CHANGES + REJECT-ROW-CHANGES + REMOVE-ATTRIBUTE + REMOVE-CHILD + REMOVE-EVENTS-PROCEDURE + REMOVE-SUPER-PROCEDURE + REPLACE + REPLACE-CHILD + REPLACE-SELECTION-TEXT + REPOSITION-BACKWARD + REPOSITION-FORWARD + REPOSITION-TO-ROW + REPOSITION-TO-ROWID + SAVE + SAVE-FILE + SAVE-ROW-CHANGES + SAX-PARSE + SAX-PARSE-FIRST + SAX-PARSE-NEXT + SCROLL-TO-CURRENT-ROW + SCROLL-TO-ITEM + SCROLL-TO-SELECTED-ROW + SEARCH + SELECT-ALL + SELECT-FOCUSED-ROW + SELECT-NEXT-ROW + SELECT-PREV-ROW + SELECT-ROW + SET-ACTOR + SET-ATTRIBUTE + SET-ATTRIBUTE-NODE + SET-BLUE-VALUE + SET-BREAK + SET-BUFFERS + SET-CALLBACK-PROCEDURE + SET-COMMIT + SET-CONNECT-PROCEDURE + SET-DYNAMIC + SET-GREEN-VALUE + SET-INPUT-SOURCE + SET-MUST-UNDERSTAND + SET-NODE + SET-NUMERIC-FORMAT + SET-PARAMETER + SET-READ-RESPONSE-PROCEDURE + SET-RED-VALUE + SET-REPOSITIONED-ROW + SET-RGB-VALUE + SET-ROLLBACK + SET-SELECTION + SET-SERIALIZED + SET-SOCKET-OPTION + SET-WAIT-STATE + STOP-PARSING + SYNCHRONIZE + TEMP-TABLE-PREPARE + VALIDATE + WRITE + MAX-HEIGHT + MAX-WIDTH + + + + + CLASSPATH + DLC + EVTLEVEL + JDKCP + JDKHOME + JFCCP + JFHOME + JIT + JRECP + JREHOME + JVMEXE + PATH + PROCFG + PROCONV + PROEXE + PROGRESSCP + PROLOAD + PROMSGS + PROPATH + PROSRV + PROSTARTUP + PROTERMCAP + TERM + TERMINAL + GATEWAY_INTERFACE + SERVER_SOFTWARE + SERVER_PROTOCOL + SERVER_NAME + SERVER_PORT + REQUEST_METHOD + SCRIPT_NAME + PATH_INFO + PATH_TRANSLATED + QUERY_STRING + REMOTE_ADDR + REMOTE_IDENT + REMOTE_USER + AUTH_TYPE + REMOTE_HOST + CONTENT_TYPE + CONTENT_LENGTH + HTTP_ACCEPT + HTTP_COOKIE + HTTP_REFERER + HTTP_USER_AGENT + HTTP_REFERER + HTTPS + HTTP_REFERER + HOSTURL + SELFURL + APPPROGRAM + APPURL + APPPROGRAM + OUTPUT-CONTENT-TYPE + WEB_SRC_PATH + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/prolog.xml b/kate/data/prolog.xml new file mode 100644 index 000000000..2f6e468bf --- /dev/null +++ b/kate/data/prolog.xml @@ -0,0 +1,230 @@ + + + + + + abstract + align + as + and + class + clauses + constants + database + determ + domains + elsedef + endclass + enddef + erroneous + facts + failure + global + goal + if + ifdef + ifndef + implement + include + language + multi + nocopy + nondeterm + object + or + procedure + protected + predicates + reference + single + static + struct + this + + + + ABSTRACT + ALIGN + AS + AND + CLASS + CLAUSES + CONSTANTS + DATABASE + DETERM + DOMAINS + ELSEDEF + ENDCLASS + ENDDEF + ERRONEOUS + FACTS + FAILURE + GLOBAL + GOAL + IF + IFDEF + IFNDEF + IMPLEMENT + INCLUDE + LANGUAGE + MULTI + NOCOPY + NONDETERM + OBJECT + OR + PROCEDURE + PROTECTED + PREDICATES + REFERENCE + SINGLE + STATIC + STRUCT + THIS + + + + + assert + asserta + assertz + bound + chain_inserta + chain_insertafter + chain_insertz + chain_terms + consult + db_btrees + db_chains + fail + findall + format + free + msgrecv + msgsend + nl + not + readterm + ref_term + retract + retractall + save + term_bin + term_replace + term_str + trap + write + writef + + + + bgidriver + bgifont + check_determ + code + config + diagnostics + error + errorlevel + heap + gstacksize + nobreak + nowarnings + printermenu + project + + + + mod + div + abs + exp + ln + log + sqrt + round + trunc + val + cos + sin + tan + arctan + random + randominit + + + + char + real + string + symbol + byte + sbyte + short + ushort + word + integer + unsigned + dword + long + ulong + binary + ref + + + + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/purebasic.xml b/kate/data/purebasic.xml new file mode 100644 index 000000000..b38daa56b --- /dev/null +++ b/kate/data/purebasic.xml @@ -0,0 +1,918 @@ + + + + + + For + ForEach + To + Step + Next + Break + Continue + If + Else + ElseIf + EndIf + Debug + Repeat + Until + Select + Case + Default + EndSelect + While + Wend + End + Structure + EndStructure + Interface + EndInterface + Extends + DefType + Dim + Enumeration + EndEnumeration + Global + Procedure + EndProcedure + ProcedureReturn + Shared + Protected + Static + Declare + DataSection + EndDataSection + Data + Restore + Read + IncludeFile + XIncludeFile + IncludeBinary + IncludePath + CompilerIf + CompilerElse + CompilerEndIf + CompilerSelect + CompilerCase + CompilerDefault + CompilerEndSelect + ProcedureDLL + NewList + Goto + Gosub + Return + FakeReturn + + + Abs + ACos + ActivateGadget + ActivateRichEdit + ActivateWindow + Add3DArchive + AddBillboard + AddDate + AddElement + AddGadgetColumn + AddGadgetItem + AddKeyboardShortcut + AddMaterialLayer + AddPackFile + AddPackMemory + AddStatusBarField + AddSysTrayIcon + AdvancedGadgetEvents + AllocateMemory + AmbientColor + AnimateEntity + Asc + ASin + ATan + AvailableScreenMemory + BackColor + Base64Encoder + BillboardGroupLocate + BillboardGroupMaterial + BillboardGroupX + BillboardGroupY + BillboardGroupZ + BillboardHeight + BillboardLocate + BillboardWidth + BillboardX + BillboardY + BillboardZ + Bin + Blue + Box + ButtonGadget + ButtonImageGadget + CallCFunctionFast + CallCFunction + CallCOM + CallDX + CallFunctionFast + CallFunction + CameraBackColor + CameraFOV + CameraLocate + CameraLookAt + CameraProjection + CameraRange + CameraRenderMode + CameraX + CameraY + CameraZ + CatchImage + CatchSound + CatchSprite + CDAudioLength + CDAudioName + CDAudioStatus + CDAudioTrackLength + CDAudioTrackSeconds + CDAudioTracks + ChangeAlphaIntensity + ChangeAlphaIntensity + ChangeCurrentElement + ChangeGamma + ChangeListIconGadgetDisplay + ChangeRichEditOptions + ChangeSysTrayIcon + CheckBoxGadget + Chr + Circle + ClearBillboards + ClearClipboard + ClearConsole + ClearError + ClearGadgetItemList + ClearList + ClearScreen + ClipSprite + CloseConsole + CloseDatabase + CloseFile + CloseFont + CloseGadgetList + CloseHelp + CloseLibrary + CloseNetworkConnection + CloseNetworkServer + ClosePack + ClosePreferences + CloseRichEdit + CloseScreen + CloseSubMenu + CloseTreeGadgetNode + CloseWindow + ColorRequester + ComboBoxGadget + CompareMemory + CompareMemoryString + ConsoleColor + ConsoleCursor + ConsoleLocate + ConsoleTitle + ContainerGadget + CopyDirectory + CopyEntity + CopyFile + CopyImage + CopyLight + CopyMaterial + CopyMemory + CopyMemoryString + CopyMesh + CopySprite + CopyTexture + Cos + CountBillboards + CountGadgetItems + CountLibraryFunctions + CountList + CountMaterialLayers + CountRenderedTriangles + CountString + CountTreeGadgetNodeItems + CRC32Fingerprint + CreateBillboardGroup + CreateCamera + CreateDirectory + CreateEntity + CreateFile + CreateGadgetList + CreateImage + CreateLight + CreateMaterial + CreateMenu + CreateMesh + CreateNetworkServer + CreatePack + CreatePalette + CreateParticleEmitter + CreatePopupMenu + CreatePreferences + CreateSprite3D + CreateSprite + CreateStatusBar + CreateTerrain + CreateTexture + CreateThread + CreateToolBar + DatabaseColumnName + DatabaseColumns + DatabaseColumnType + DatabaseDriverDescription + DatabaseDriverName + DatabaseError + DatabaseQuery + DatabaseUpdate + Date + Day + DayOfWeek + DayOfYear + DefaultPrinter + Delay + DeleteDirectory + DeleteElement + DeleteFile + DESFingerprint + DetachMenu + DirectoryEntryAttributes + DirectoryEntryAttributes + DirectoryEntryName + DirectoryEntrySize + DisableGadget + DisableMaterialLighting + DisableMenuItem + DisableToolBarButton + DisASMCommand + DisplayAlphaSprite + DisplayAlphaSprite + DisplayPalette + DisplayPopupMenu + DisplayRGBFilter + DisplayShadowSprite + DisplayShadowSprite + DisplaySolidSprite + DisplaySprite3D + DisplaySprite + DisplayTranslucideSprite + DisplayTransparentSprite + DrawImage + DrawingBuffer + DrawingBufferPitch + DrawingBufferPixelFormat + DrawingFont + DrawingMode + DrawText + EditorGadget + EjectCDAudio + ElapsedMilliseconds + Ellipse + EndTimer + Engine3DFrameRate + EntityAnimationLength + EntityLocate + EntityMaterial + EntityMesh + EntityX + EntityY + EntityZ + Eof + EventGadgetID + EventlParam + EventMenuID + EventType + EventWindowID + EventwParam + ExamineDatabaseDrivers + ExamineDirectory + ExamineIPAddresses + ExamineJoystick + ExamineKeyboard + ExamineLibraryFunctions + ExamineMouse + ExamineScreenModes + ExplorerComboGadget + ExplorerListGadget + ExplorerTreeGadget + FileSeek + FileSize + FillArea + FindString + FindText + FirstDatabaseRow + FirstElement + FlipBuffers + Fog + FontDialog + FontID + FontRequester + FormatDate + Frame3DGadget + FreeBillboardGroup + FreeCamera + FreeEntity + FreeGadget + FreeImage + FreeLight + FreeMaterial + FreeMemory + FreeMenu + FreeMesh + FreeModule + FreeMovie + FreePalette + FreeParticleEmitter + FreeSound + FreeSprite3D + FreeSprite + FreeStatusBar + FreeTexture + FreeToolBar + FrontColor + GadgetHeight + GadgetID + GadgetItemID + GadgetToolTip + GadgetWidth + GadgetX + GadgetY + GetClipboardData + GetClipboardText + GetCurrentEIP + GetDatabaseFloat + GetDatabaseLong + GetDatabaseString + GetDisASMString + GetEntityAnimationTime + GetErrorAddress + GetErrorCounter + GetErrorDescription + GetErrorDLL + GetErrorLineNR + GetErrorModuleName + GetErrorNumber + GetErrorRegister + GetExtensionPart + GetFilePart + GetGadgetAttribute + GetGadgetItemAttribute + GetGadgetItemState + GetGadgetItemText + GetGadgetState + GetGadgetText + GetMaxTimerResolution + GetMenuItemState + GetMinTimerResolution + GetModulePosition + GetModuleRow + GetPaletteColor + GetPathPart + GetRichEditStyle + GetRichEditText + GetSelectedText + GetWindowTitle + GoToEIP + GrabImage + GrabSprite + Green + Hex + HideBillboardGroup + HideEntity + HideGadget + HideLight + HideMenu + HideParticleEmitter + HideWindow + Hostname + Hour + HyperLinkGadget + ImageDepth + ImageGadget + ImageHeight + ImageID + ImageOutput + ImageWidth + InitCDAudio + InitDatabase + InitEngine3D + InitJoystick + InitKeyboard + InitModule + InitMouse + InitMovie + InitNetwork + InitPalette + InitSound + InitSprite3D + InitSprite + Inkey + Input + InputRequester + InsertElement + Int + IPAddressField + IPAddressGadget + IPString + IPString + IsDatabase + IsDirectory + IsFile + IsFilename + IsFont + IsFunctionEntry + IsFunction + IsGadget + IsImage + IsLibrary + IsMenu + IsModule + IsMovie + IsPalette + IsScreenActive + IsSprite3D + IsSprite + IsStatusBar + IsSysTrayIcon + IsToolBar + IsWindow + JoystickAxisX + JoystickAxisY + JoystickButton + KeyboardInkey + KeyboardMode + KeyboardPushed + KeyboardReleased + KillThread + LastElement + LCase + Left + Len + LibraryFunctionAddress + LibraryFunctionName + LightColor + LightLocate + LightSpecularColor + Line + LineXY + ListIconGadget + ListIndex + ListViewGadget + LoadFont + LoadImage + LoadMesh + LoadModule + LoadMovie + LoadPalette + LoadSound + LoadSprite + LoadTexture + LoadWorld + Locate + Loc + Lof + Log10 + Log + LSet + LTrim + MakeIPAddress + MakeIPAddress + MaterialAmbientColor + MaterialBlendingMode + MaterialDiffuseColor + MaterialFilteringMode + MaterialID + MaterialShadingMode + MaterialSpecularColor + MD5FileFingerprint + MD5Fingerprint + MDIGadget + MemoryStringLength + MenuBar + MenuHeight + MenuID + MenuItem + MenuTitle + MeshID + MessageRequester + Mid + Minute + ModuleVolume + Month + MouseButton + MouseDeltaX + MouseDeltaY + MouseLocate + MouseWheel + MouseX + MouseY + MoveBillboardGroup + MoveBillboard + MoveCamera + MoveEntity + MoveLight + MoveParticleEmitter + MoveWindow + MovieAudio + MovieHeight + MovieInfo + MovieLength + MovieSeek + MovieStatus + MovieWidth + NetworkClientEvent + NetworkClientID + NetworkServerEvent + NewPrinterPage + NextDatabaseDriver + NextDatabaseRow + NextDirectoryEntry + NextElement + NextIPAddress + NextLibraryFunction + NextPackFile + NextScreenMode + NextSelectedFileName + OffsetOf + OnErrorExit + OnErrorGosub + OnErrorGoto + OnErrorResume + OpenComPort + OpenConsole + OpenDatabase + OpenDatabaseRequester + OpenFile + OpenFileRequester + OpenGadgetList + OpenHelp + OpenLibrary + OpenNetworkConnection + OpenPack + OpenPreferences + OpenRichEdit + OpenScreen + OpenSubMenu + OpenTreeGadgetNode + OpenWindowedScreen + OpenWindow + OptionGadget + OSVersion + PackerCallback + PackFileSize + PackMemory + PanelGadget + ParseDate + ParticleColorFader + ParticleColorRange + ParticleEmissionRate + ParticleEmitterLocate + ParticleEmitterX + ParticleEmitterY + ParticleEmitterZ + ParticleMaterial + ParticleSize + ParticleTimeToLive + ParticleVelocity + PathRequester + PauseCDAudio + PauseMovie + PauseThread + PeekB + PeekF + PeekL + PeekS + PeekW + PlayCDAudio + PlayModule + PlayMovie + PlaySound + Plot + Point + PokeB + PokeF + PokeL + PokeS + PokeW + Pow + PreferenceComment + PreferenceGroup + PreviousDatabaseRow + PreviousElement + PrinterOutput + PrinterPageHeight + PrinterPageWidth + Print + PrintN + PrintRequester + ProgramParameter + ProgressBarGadget + Random + RandomSeed + ReadByte + ReadData + ReadFile + ReadFloat + ReadLong + ReadPreferenceFloat + ReadPreferenceLong + ReadPreferenceString + ReadString + ReadWord + ReAllocateMemory + ReceiveNetworkData + ReceiveNetworkFile + Red + ReleaseMouse + RemoveBillboard + RemoveGadgetColumn + RemoveGadgetItem + RemoveKeyboardShortcut + RemoveMaterialLayer + RemoveString + RemoveSysTrayIcon + RenameFile + RenderMovieFrame + RenderWorld + ReplaceString + ReplaceText + ResetList + ResizeBillboard + ResizeEntity + ResizeGadget + ResizeImage + ResizeMovie + ResizeParticleEmitter + ResizeRichEdit + ResizeWindow + ResumeCDAudio + ResumeMovie + ResumeThread + RGB + RichEditBackgroundColor + RichEditBackground + RichEditFontFace + RichEditFont + RichEditFontSize + RichEditHeight + RichEditID + RichEditIndex + RichEditLocate + RichEditMouseX + RichEditMouseY + RichEditOptions + RichEditParent + RichEditTextColor + RichEditWidth + RichEditX + RichEditY + Right + RotateBillboardGroup + RotateCamera + RotateEntity + RotateMaterial + RotateParticleEmitter + RotateSprite3D + Round + RSet + RTrim + RunProgram + SaveFileRequester + SaveImage + SaveSprite + ScaleEntity + ScaleMaterial + ScreenID + ScreenModeDepth + ScreenModeHeight + ScreenModeRefreshRate + ScreenModeWidth + ScreenOutput + ScrollAreaGadget + ScrollBarGadget + ScrollMaterial + Second + SelectedFilePattern + SelectedFontColor + SelectedFontName + SelectedFontSize + SelectedFontStyle + SelectedRange + SelectElement + SelectText + SendNetworkData + SendNetworkFile + SendNetworkString + SetClipboardData + SetClipboardText + SetEntityAnimationTime + SetErrorNumber + SetFrameRate + SetGadgetAttribute + SetGadgetFont + SetGadgetItemAttribute + SetGadgetItemState + SetGadgetItemText + SetGadgetState + SetGadgetText + Set/GetWindowTitle + SetMenuItemState + SetMeshData + SetModulePosition + SetPaletteColor + SetRefreshRate + SetRichEditCallback + SetRichEditText + SetWindowCallback + SetWindowTitle + Sin + SizeOf + SkyBox + SkyDome + SortArray + SortList + SoundFrequency + SoundPan + SoundVolume + Space + SpinGadget + SplitterGadget + Sprite3DBlendingMode + Sprite3DQuality + SpriteCollision + SpriteDepth + SpriteHeight + SpriteOutput + SpritePixelCollision + SpriteWidth + Sqr + Start3D + StartDrawing + StartPrinting + StartSpecialFX + StartTimer + StatusBarIcon + StatusBarText + Stop3D + StopCDAudio + StopDrawing + StopModule + StopMovie + StopPrinting + StopSound + StopSpecialFX + StreamFileIn + StreamFileOut + StrF + StringField + StringGadget + Str + StrU + SysTrayIconToolTip + Tan + TerrainHeight + TextGadget + TextLength + TextureHeight + TextureID + TextureOutput + TextureWidth + ThreadPriority + ToolBarImageButton + ToolBarSeparator + ToolBarStandardButton + ToolBarToolTip + TrackBarGadget + TransformSprite3D + TransparentSpriteColor + TreeGadget + TreeGadgetItemNumber + Trim + UCase + UnpackMemory + UseBuffer + UseCDAudio + UseDatabase + UseDirectory + UseFile + UseFont + UseGadgetList + UseImage + UseJPEGImageDecoder + UseJPEGImageEncoder + UseMovie + UseOGGSoundDecoder + UsePalette + UsePNGImageDecoder + UsePNGImageEncoder + UseRichEdit + UseTGAImageDecoder + UseTIFFImageDecoder + UseWindow + ValF + Val + WaitThread + WaitWindowEvent + WebGadget + WindowEvent + WindowHeight + WindowID + WindowMouseX + WindowMouseY + WindowOutput + WindowWidth + WindowX + WindowY + WriteByte + WriteData + WriteFloat + WriteLong + WritePreferenceFloat + WritePreferenceLong + WritePreferenceString + WriteString + WriteStringN + WriteWord + Year + ZoomSprite3D + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/python.xml b/kate/data/python.xml new file mode 100644 index 000000000..9296f4c7e --- /dev/null +++ b/kate/data/python.xml @@ -0,0 +1,233 @@ + + + + + + + import + from + as + + + + and + assert + break + class + continue + def + del + elif + else + except + exec + finally + for + global + if + in + is + lambda + not + or + pass + print + raise + return + try + while + yield + + + + abs + apply + buffer + callable + chr + cmp + coerce + compile + complex + copyright + credits + delattr + dir + divmod + eval + execfile + exit + filter + float + getattr + globals + hasattr + hash + hex + id + input + int + intern + isinstance + issubclass + iter + len + license + list + locals + long + map + max + min + oct + open + ord + pow + quit + range + raw_input + reduce + reload + repr + round + setattr + slice + str + tuple + type + unichr + unicode + vars + xrange + zip + + + + None + self + cls + True + False + NotImplemented + Ellipsis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/r.xml b/kate/data/r.xml new file mode 100644 index 000000000..b9937ea58 --- /dev/null +++ b/kate/data/r.xml @@ -0,0 +1,136 @@ + + + + + + + + for + in + next + break + while + repeat + if + else + switch + function + + + TRUE + FALSE + NULL + NA + Inf + NaN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/rexx.xml b/kate/data/rexx.xml new file mode 100644 index 000000000..b22f65d0d --- /dev/null +++ b/kate/data/rexx.xml @@ -0,0 +1,134 @@ + + + + + + arg + drop + else + end + exit + forever + if + interpret + iterate + leave + nop + options + otherwise + pull + push + queue + return + say + select + syntax + then + + + abbrev + abs + address + bitand + bitor + bitxor + b2x + center + charin + charout + chars + c2d + c2x + compare + condition + copies + datatype + date + delstr + delword + digits + d2c + d2x + errortext + form + format + fuzz + insert + lastpos + left + linein + lineout + lines + max + min + overlay + pos + queued + random + reverse + right + sign + sourceline + space + stream + strip + substr + subword + symbol + time + trace + translate + trunc + value + verify + word + wordindex + wordlength + wordpos + words + xrange + x2b + x2c + x2d + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/rhtml.xml b/kate/data/rhtml.xml new file mode 100644 index 000000000..c78702954 --- /dev/null +++ b/kate/data/rhtml.xml @@ -0,0 +1,1235 @@ + + + +]> + + + + + + + + + + + + BEGIN + END + and + begin + break + case + defined? + do + else + elsif + end + ensure + for + if + in + include + next + not + or + redo + rescue + retry + return + then + unless + until + when + while + yield + + + + private_class_method + private + protected + public_class_method + public + + + + attr_reader + attr_writer + attr_accessor + + + + alias + module + class + def + undef + + + + self + super + nil + false + true + caller + __FILE__ + __LINE__ + + + + $stdout + $defout + $stderr + $deferr + $stdin + + + + + + abort + at_exit + autoload + autoload? + binding + block_given? + callcc + caller + catch + chomp + chomp! + chop + chop! + eval + exec + exit + exit! + fail + fork + format + getc + gets + global_variables + gsub + gsub! + iterator? + lambda + load + local_variables + loop + method_missing + open + p + print + printf + proc + putc + puts + raise + rand + readline + readlines + require + scan + select + set_trace_func + sleep + split + sprintf + srand + sub + sub! + syscall + system + test + throw + trace_var + trap + untrace_var + warn + + + auto_complete_field + auto_complete_result + auto_discovery_link_tag + auto_link + benchmark + button_to + cache + capture + check_box + check_box_tag + collection_select + concat + content_for + content_tag + country_options_for_select + country_select + current_page? + date_select + datetime_select + debug + define_javascript_functions + distance_of_time_in_words + distance_of_time_in_words_to_now + draggable_element + drop_receiving_element + end_form_tag + error_message_on + error_messages_for + escape_javascript + evaluate_remote_response + excerpt + file_field + file_field_tag + finish_upload_status + form + form_remote_tag + form_tag + form_tag_with_upload_progress + h + hidden_field + hidden_field_tag + highlight + human_size + image_path + image_submit_tag + image_tag + input + javascript_include_tag + javascript_path + javascript_tag + link_image_to + link_to + link_to_function + link_to_if + link_to_image + link_to_remote + link_to_unless + link_to_unless_current + mail_to + markdown + number_to_currency + number_to_human_size + number_to_percentage + number_to_phone + number_with_delimiter + number_with_precision + observe_field + observe_form + option_groups_from_collection_for_select + options_for_select + options_from_collection_for_select + pagination_links + password_field + password_field_tag + periodically_call_remote + pluralize + radio_button + radio_button_tag + register_template_handler + render + render_file + render_template + sanitize + select + select_date + select_datetime + select_day + select_hour + select_minute + select_month + select_second + select_tag + select_time + select_year + simple_format + sortable_element + start_form_tag + strip_links + stylesheet_link_tag + stylesheet_path + submit_tag + submit_to_remote + tag + text_area + text_area_tag + text_field + text_field_tag + text_field_with_auto_complete + textilize + textilize_without_paragraph + time_ago_in_words + time_zone_options_for_select + time_zone_select + truncate + update_element_function + upload_progress_status + upload_progress_text + upload_progress_update_bar_js + upload_status_progress_bar_tag + upload_status_tag + upload_status_text_tag + url_for + visual_effect + word_wrap + + + + TODO + FIXME + NOTE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/rib.xml b/kate/data/rib.xml new file mode 100644 index 000000000..8472016a9 --- /dev/null +++ b/kate/data/rib.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + AreaLightSource + Attribute + AttributeBegin + AttributeEnd + Begin + Bound + Clipping + Color + ColorSamples + ConcatTransform + CoordinateSystem + CropWindow + Declare + DepthOfField + Detail + DetailRange + Displacement + Display + End + Exterior + Format + FrameAspectRatio + FrameBegin + FrameEnd + GeometricApproximation + Hider + Identity + Illuminance + Illuminate + Interior + LightSource + Matte + Opacity + Option + Orientation + Perspective + PixelFilter + PixelSamples + PixelVariance + Projection + Quantize + RelativeDetail + Rotate + Scale + ScreenWindow + ShadingInterpolation + ShadingRate + Shutter + Sides + Skew + Surface + TextureCoordinates + Transform + TransformBegin + TransformEnd + TransformPoints + Translate + version + WorldBegin + WorldEnd + + + Basis + Cylinder + Disk + GeneralPolygon + Geometry + Hyperboloid + NuPatch + ObjectBegin + ObjectEnd + ObjectInstance + Patch + Paraboloid + PointsPolygons + PointsGeneralPolygons + Polygon + Procedural + SolidBegin + SolidEnd + Sphere + Torus + + + MotionBegin + MotionEnd + + + MakeBump + MakeCubeFaceEnvironment + MakeLatLongEnvironment + MakeTexture + ArchiveRecord + ErrorHandler + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/rpmspec.xml b/kate/data/rpmspec.xml new file mode 100644 index 000000000..246bb264d --- /dev/null +++ b/kate/data/rpmspec.xml @@ -0,0 +1,80 @@ + + + + + + Name + Summary + Version + Epoch + Serial + Release + Source + Group + Copyright + License + Vendor + Distribution + Packager + Url + URL + Prefix + Conflicts + Obsoletes + Provides + PreReq + Requires + BuildArch + BuildArchitectures + BuildConflicts + BuildRequires + BuildRoot + ExclusiveArch + ExclusiveOs + ExcludeArch + ExcludeOs + + + GPL + LGPL + Artistic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/rsiidl.xml b/kate/data/rsiidl.xml new file mode 100644 index 000000000..574e19143 --- /dev/null +++ b/kate/data/rsiidl.xml @@ -0,0 +1,440 @@ + + + + + + For + Do + Endfor + Repeat + Endrep + While + Endwhile + Until + Case + Endcase + If + Endif + Else + Endelse + Then + Begin + End + Function + Goto + Pro + Eq + Ge + Gt + Le + Lt + Ne + Mod + Or + Xor + Not + And + Then + Return + Common + Of + On_ioerror + + + dpi + dtor + map + pi + radeg + values + err + error_state + error + err_string + except + mouse + msg_prefix + syserror + syserr_string + warn + dir + dlm_path + edit_input + help_path + journal + more + path + prompt + quiet + version + c + d + order + p + x + y + z + stime + + + Fix + Long + Long64 + uint + Byte + Float + Double + complex + dcomplex + complexarr + dcomplexarr + String + Intarr + lonarr + lon64arr + uintarr + ulong + ulonarr + ulon64arr + Bytarr + Bytscl + Fltarr + Dblarr + Strarr + Objarr + Indgen + Findgen + Dindgen + Dcindgen + cindgen + lindgen + bindgen + sindgen + uindgen + ul64indgen + l64indgen + ulindgen + Replicate + Ptrarr + + + ABS + ACOS + ADAPT_HIST_EQUAL + ALOG + ALOG10 + ARG_PRESENT + ASIN + ASSOC + ATAN + AXIS + BESELI + BESELJ + BESELY + BLAS_AXPY + BREAKPOINT + BROYDEN + BYTEORDER + CALL_EXTERNAL + CALL_FUNCTION + CALL_METHOD + CALL_PROCEDURE + CATCH + CEIL + CHECK_MATH + CHOLDC + CHOLSOL + COLOR_CONVERT + COLOR_QUAN + COMPILE_OPT + COMPUTE_MESH_NORMALS + CONJ + CONSTRAINED_MIN + CONTOUR + CONVERT_COORD + CONVOL + CORRELATE + COS + COSH + CREATE_STRUCT + CURSOR + DEFINE_KEY + DEFSYSV + DELVAR + DEVICE + DFPMIN + DIALOG_MESSAGE + DIALOG_PICKFILE + DIALOG_PRINTERSETUP + DIALOG_PRINTJOB + DILATE + DLM_LOAD + DRAW_ROI + ELMHES + EMPTY + ENABLE_SYSRTN + ERASE + ERODE + ERRORF + EXECUTE + EXIT + EXP + EXPAND_PATH + EXPINT + FINDFILE + FINITE + FLOOR + FORMAT_AXIS_VALUES + FORWARD_FUNCTION + FSTAT + FULSTR + FZ_ROOTS + GAUSSINT + GET_KBRD + GETENV + GRID_TPS + GRID3 + HEAP_GC + HELP + HISTOGRAM + HQR + IMAGE_STATISTICS + IMAGINARY + INTERPOLATE + INVERT + ISHFT + ISOCONTOUR + ISOSURFACE + JOURNAL + KEYWORD_SET + LABEL_REGION + LINBCG + LINKIMAGE + LMGR + LNGAMMA + LNP_TEST + LOADCT + LOCALE_GET + LSODE + LUDC + LUMPROVE + LUSOL + MACHAR + MAKE_ARRAY + MAP_PROJ_INFO + MAX + MEDIAN + MESH_CLIP + MESH_DECIMATE + MESH_ISSOLID + MESH_MERGE + MESH_NUMTRIANGLES + MESH_SMOOTH + MESH_SURFACEAREA + MESH_VALIDATE + MESH_VOLUME + MESSAGE + MIN + N_ELEMENTS + N_PARAMS + N_TAGS + NEWTON + OBJ_CLASS + OBJ_DESTROY + OBJ_ISA + OBJ_NEW + OBJ_VALID + ON_ERROR + OPLOT + PARTICLE_TRACE + PLOT + PLOTS + POLY_2D + POLYFILL + POLYFILLV + POLYSHADE + POWELL + PROFILER + PTR_FREE + PTR_NEW + PTR_VALID + QROMB + QROMO + QSIMP + RANDOMN + RANDOMU + REBIN + REFORM + RETALL + RETURN + RIEMANN + RK4 + ROBERTS + ROTATE + ROUND + SET_PLOT + SET_SHADING + SETENV + SHADE_SURF + SHADE_VOLUME + SHIFT + SIN + SINH + SIZE + SMOOTH + SOBEL + SORT + SPL_INIT + SPL_INTERP + SPRSAB + SPRSAX + SPRSIN + SQRT + STOP + STRCMP + STRCOMPRESS + STREGEX + STRJOIN + STRLEN + STRLOWCASE + STRMATCH + STRMESSAGE + STRMID + STRPOS + STRPUT + STRTRIM + STRUCT_ASSIGN + STRUCT_HIDE + STRUPCASE + SURFACE + SVDC + SVSOL + SYSTIME + TAG_NAMES + TAN + TANH + TEMPORARY + TETRA_CLIP + TETRA_SURFACE + TETRA_VOLUME + THIN + THREED + TOTAL + TRANSPOSE + TRIANGULATE + TRIGRID + TRIQL + TRIRED + TRISOL + TV + TVCRS + TVLCT + TVRD + TVSCLU + USERSYM + VALUE_LOCATE + VOIGT + VOXEL_PROJ + WAIT + WATERSHED + WDELETE + WHERE + WIDGET_BASE + WIDGET_BUTTON + WIDGET_CONTROL + WIDGET_DRAW + WIDGET_DROPLIST + WIDGET_EVENT + WIDGET_INFO + WIDGET_LABEL + WIDGET_LIST + WIDGET_SLIDER + WIDGET_TABLE + WIDGET_TEXT + WINDOW + WSET + WSHOW + WTN + XYOUTS + + + Open + FLUSH + IOCTL + RESTORE + SAVE + POINT_LUN + Openr + Openw + Openu + Close + Free_lun + get_lun + assoc + catch + cd + spawn + eof + print + printf + prints + read + readf + reads + writu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/ruby.xml b/kate/data/ruby.xml new file mode 100644 index 000000000..76b88f719 --- /dev/null +++ b/kate/data/ruby.xml @@ -0,0 +1,908 @@ + + + + + + + + + + + + + + BEGIN + END + and + begin + break + case + defined? + do + else + elsif + end + ensure + for + if + in + include + next + not + or + redo + rescue + retry + return + then + unless + until + when + while + yield + + + + private_class_method + private + protected + public_class_method + public + + + + attr_reader + attr_writer + attr_accessor + + + + alias + module + class + def + undef + + + + self + super + nil + false + true + caller + __FILE__ + __LINE__ + + + + $stdout + $defout + $stderr + $deferr + $stdin + + + + + + abort + at_exit + autoload + autoload? + binding + block_given? + callcc + caller + catch + chomp + chomp! + chop + chop! + eval + exec + exit + exit! + fail + fork + format + getc + gets + global_variables + gsub + gsub! + iterator? + lambda + load + local_variables + loop + method_missing + open + p + print + printf + proc + putc + puts + raise + rand + readline + readlines + require + scan + select + set_trace_func + sleep + split + sprintf + srand + sub + sub! + syscall + system + test + throw + trace_var + trap + untrace_var + warn + + + + TODO + FIXME + NOTE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sather.xml b/kate/data/sather.xml new file mode 100644 index 000000000..472ca8788 --- /dev/null +++ b/kate/data/sather.xml @@ -0,0 +1,141 @@ + + + + + + and + assert + attr + break! + case + class + const + else + elsif + end + exception + external + false + if + include + initial + is + ITER + loop + new + or + post + pre + private + protect + quit + raise + readonly + result + return + ROUT + SAME + self + shared + then + true + typecase + type + until! + value + void + when + while! + yield + abstract + any + bind + fork + guard + immutable + inout + in + lock + once + out + parloop + partial + par + spread + stub + + + $OB + ARRAY + AREF + AVAL + BOOL + CHAR + EXT_OB + FLTDX + FLTD + FLTX + FLTI + FLT + INTI + INT + $REHASH + STR + SYS + + + create + invariant + main + aget + aset + div + is_eq + is_geq + is_gt + is_leq + is_lt + is_neq + minus + mod + negate + not + plus + pow + times + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/scheme.xml b/kate/data/scheme.xml new file mode 100644 index 000000000..027989b90 --- /dev/null +++ b/kate/data/scheme.xml @@ -0,0 +1,436 @@ + + + + + + + <= + < + = + => + >= + > + - + / + *,* + *) + + + + + #\nul + #\soh + #\stx + #\etx + #\eot + #\enq + #\ack + #\bel + #\bs + #\ht + #\nl + #\vt + #\np + #\cr + #\so + #\si + #\dle + #\dc1 + #\dc2 + #\dc3 + #\dc4 + #\nak + #\syn + #\etb + #\can + #\em + #\sub + #\esc + #\fs + #\gs + #\rs + #\us + #\space + #\sp + #\newline + #\nl + #\tab + #\ht + #\backspace + #\bs + #\return + #\cr + #\page + #\np + #\null + #\nul + + + define + define* + define-accessor + define-class + defined? + define-generic + define-macro + define-method + define-module + define-private + define-public + define*-public + define-reader-ctor + define-syntax + define-syntax-macro + defmacro + defmacro* + defmacro*-public + + + abs + acos + and + angle + append + applymap + asin + assoc + assq + assv + atan + begin + boolean? + break + caaaar + caaadr + caaar + caadar + caaddr + caadr + caar + cadaar + cadadr + cadar + caddar + cadddr + caddr + cadr + call/cc + call-with-current-continuation + call-with-input-file + call-with-output-file + call-with-values + car + case + catch + cdaaar + cdaadr + cdaar + cdadar + cdaddr + cdadr + cdar + cddaar + cddadr + cddar + cdddar + cddddr + cdddr + cddr + cdr + ceiling + char-alphabetic? + char-ci>=? + char-ci>? + char-ci=? + char-ci<=? + char-downcase + char->integer + char>=? + char>? + char=? + char? + char-lower-case? + char<?c + char<=? + char-numeric? + char-ready? + char-upcase + char-upper-case? + char-whitespace? + close-input-port + close-output-port + complex? + cond + cons + continue + cos + current-input-port + current-output-port + denominator + display + do + dynamic-wind + else + eof-object? + eq? + equal? + eqv? + eval + even? + exact->inexact + exact? + exp + expt + floor + force + for-each + gcd + har-ci<? + if + imag-part + inexact->exact + inexact? + input-port? + integer->char + integer? + interaction-environment + lambda + lcm + length + let + let* + letrec + letrec-syntax + let-syntax + list->string + list + list? + list-ref + list-tail + load + log + magnitude + make-polar + make-rectangular + make-string + make-vector + max + member + memq + memv + min + modulo + negative? + newline + not + null-environment + null? + number? + number->string + numerator + odd? + open-input-file + open-output-file + or + output-port? + pair? + peek-char + port? + positive? + procedure? + quotient + rational? + rationalize + read-char + read + real? + real-part + remainder + reverse + round + scheme-report-environment + set-car! + set-cdr! + sin + sqrt + string-append + string-ci>=? + string-ci>? + string-ci=? + string-ci<=? + string-ci<? + string-copy + string-fill! + string>=? + string>? + string->list + string->number + string->symbol + string=? + string + string? + string-length + string<=? + string<? + string-ref + string-set! + substring + symbol->string + symbol? + syntax-rules + tan + transcript-off + transcript-on + truncate + values + vector-fill! + vector->listlist->vector + vector + vector? + vector-length + vector-ref + vector-set! + while + with-input-from-file + with-output-to-file + write-char + write + zero? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sci.xml b/kate/data/sci.xml new file mode 100644 index 000000000..0a792e1bb --- /dev/null +++ b/kate/data/sci.xml @@ -0,0 +1,1191 @@ + + + + + + do + else + for + if + elseif + end + select + then + while + + + abort + break + quit + return + resume + pause + + + function + endfunction + + + error + warning + + + %F + %f + %T + %t + %e + %pi + %inf + %i + %z + %io + %s + %nan + $ + %eps + MSDOS + + + zpell + zpch2 + zpch1 + zpbutt + zgrid + zeros + zeropen + ZCROSS_f + yulewalk + xtitle + xtape + xstringl + xstringb + xstring + xsetm + xsetech + xset + xselect + xsegs + xsave + xs2fig + xrpoly + xrects + xrect + xpolys + xpoly + xpause + xnumb + xname + x_message_modeless + x_message + x_mdialog + x_matrix + xload + xlfont + xinit + xinfo + xgrid + xgraduate + xgetmouse + xgetfile + xgetech + xget + xfrect + xfpolys + xfpoly + xfarcs + xfarc + xend + x_dialog + xdel + xclip + xclick + xclear + xclea + x_choose + x_choices + xchange + xbasr + xbasimp + xbasc + xaxis + xarrows + xarcs + xarc + WRITEC_f + write4b + write + writb + winsid + window + wigner + wiener + whos + who + whereis + whereami + where + what + wfir + WFILE_f + wavwrite + wavread + warning + WaitMsg + varn + varargout + varargin + user + unsetmenu + unobs + unix_x + unix_w + unix_s + unix_g + unix + unique + union + ulink + ui_observer + uint8 + uint32 + uint16 + uimenu + uicontrol + typeof + typename + type + trzeros + triu + trisolve + tril + trianfml + trfmod + TRASH_f + translatepaths + trans_closure + trans + trace + toeplitz + tlist + TK_SetVar + TK_GetVar + TK_EvalStr + TK_EvalFile + titlepage + timer + time_id + TIME_f + tilda + tf2ss + tf2des + TEXT_f + texprint + testmatrix + tdinit + TCLSS_f + tanm + tanhm + tanh + tangent + TANBLK_f + tan + systmat + systems + system + syssize + syslin + sysfact- + sysdiag + sysconv + symbols + sylv + sylm + svplot + svd + sva + supernode + SUPER_f + sum + successors + subplot + subgraph + subf + strsubst + strong_con_nodes + strong_connex + stripblanks + strings + string + strindex + strcat + str2code + STOP_f + st_ility + st_deviation + startup + star + standard_output + standard_origin + standard_input + standard_draw + standard_define + stacksize + stabil + ssrand + ssprint + sskf + sscanf + ss2tf + ss2ss + ss2des + srkf + srfaur + squarewave + square + sqrtm + sqrt + sqroot + spzeros + sprintf + sprand + spones + SPLIT_f + split_edge + splin + spget + speye + specfact + spec + spcompack + spchol + sparse + spantwo + spanplus + spaninter + sp2adj + sound + sort + SOM_f + solve + %sn + smooth + sm2ss + sm2des + slash + size + sinm + sinhm + sinh + sincd + sinc + SINBLK_f + sin + simp_mode + simp + signm + sign + showprofile + show_nodes + show_graph + show_arcs + shortest_path + sgrid + Sgrayplot + Sfgrayplot + sfact + setscicosvars + setmenu + setfield + setbpt + set + sensi + SendMsg + semidef + semicolumn + semi + SELECT_f + secto3d + sd2sci + SCOPXY_f + SCOPE_f + scilink + ScilabEval + scilab + scifunc_block + scicos_model + scicos_menus + scicos_main + scicos_link + scicosim + scicos_graphics + scicos_cpr + scicos_block + scicos + sciargs + sci2map + sci2for + sci2exp + schur + scanf_conversion + scanf + scaling + SAWTOOTH_f + savewave + save_graph + save + SAT_f + SAMPLEHOLD_f + salesman + rtitr + rref + rpem + rowshuff + rowregul + rowinout + rowcompr + rowcomp + routh_t + round + rotate + roots + rlist + ric_desc + riccati + ricc + RFILE_f + residu + replot + repfreq + remezb + remez + RELAY_f + reglin + REGISTER_f + recur + real + readmps + READC_f + readc_ + readb + read4b + read + rdivf + rcond + rational + rat + rank + range + randpencil + RAND_f + rand + quote + quit + quaskro + quapro + QUANT_f + qr + qassign + pwd + pvm_tidtohost + pvm_start + pvm_spawn_independent + pvm_spawn + pvm_set_timer + pvm_send + pvm_sci2f77 + pvm_reduce + pvm_recv + pvm_probe + pvm_mytid + pvm_lvgroup + pvm_kill + pvm_joingroup + pvm_halt + pvm_gsize + pvm_get_timer + pvm_getinst + pvm_exit + pvm_error + pvm_delhosts + pvmd3 + pvm_config + pvm_bufinfo + pvm_bcast + pvm_addhosts + pvm + pspect + psmall + projspec + projsl + proj + profile + PROD_f + prod + printing + printf_conversion + printf + print + predef + predecessors + prbs_a + ppol + power + POWBLK_f + POSTONEG_f + portrait + portr3d + poly + polfact + polarplot + polar + pol2tex + pol2str + pol2des + pmodulo + p_margin + plzr + plus + plotprofile + plot_graph + plotframe + plot3d3 + plot3d2 + plot3d1 + plot3d + plot2d4 + plot2d3 + plot2d2 + plot2d1 + plot2d + plot + playsnd + pipe_network + pinv + phc + phasemag + pfss + pertrans + perfect_match + percent + penlaur + pencan + pen2ea + pdiv + pbig + path_2_nodes + part + parrot + parents + paramfplot2d + param3d1 + param3d + overloading + OUT_f + orth + or + optim + ones + oldsave + oldload + ode_root + odeoptions + ode_discrete + odedi + odedc + ode + obsvss + obsv_mat + obs_gram + observer + obscont1 + obscont + nyquist + numer + null + not + norm + noisegen + nodes_degrees + nodes_2_path + node_number + nnz + nlev + nf3d + newfun + newest + netwindows + netwindow + netclose + neighbors + nehari + NEGTOPOS_f + narsimul + names + MUX_f + mulf + mu2lin + mtlb_sparse + mtlb_save + mtlb_mode + mtlb_load + mtell + msscanf + msprintf + mseek + mscanf + mrfit + mputstr + mputl + mput + mps2linpro + mprintf + mopen + modulo + mode + mlist + min_weight_tree + minus + minss + minreal + min_qcost_flow + min_lcost_flow2 + min_lcost_flow1 + min_lcost_cflow + mini + MIN_f + mine + min + milk_drop + mgetstr + mgetl + mgeti + mget + mfscanf + mfprintf + mfile2sci + mfft + MFCLCK_f + metanet_sync + metanet + mesh2d + mese + meof + median + mean + mclose + MCLOCK_f + mclearerr + m_circle + maxi + max_flow + MAX_f + max_clique + max_cap_path + max + matrix + matrices + Matplot1 + Matplot + mat_2_graph + markp2ss + mapsound + manedit + man + make_graph + macrovar + macro + macr2lst + macglov + lyap + lusolve + luget + lufact + ludel + lu + ltitr + lstcat + lsslist + lqr + lqg_ltr + lqg2stan + lqg + lqe + lotest + LOOKUP_f + logspace + logm + LOGBLK_f + log2 + log10 + log + locate + loadwave + load_graph + load + lmitool + lmisolver + list + linspace + linsolve + linpro + link + linfn + linf + lines + line_graph + lindquist + lin2mu + lin + lib + lgfft + lft + lex_sort + levin + lev + less + leqr + length + legends + left + leastsq + ldivf + ldiv + lcmdiag + lcm + lcf + lattp + lattn + lasterror + kroneck + kron + krac2 + kpure + knapsack + keyboard + kernel + karmarkar + kalm + %k + jmat + isreal + isoview + isnan + isinf + isglobal + iserror + isdef + is_connex + invsyslin + invr + inv_coeff + INVBLK_f + inv + inttype + inttrap + intsplin + INTRPLBLK_f + INTRP2BLK_f + intppty + intl + intg + intersect + intersci + interpln + interp + integrate + INTEGRAL_f + intdec + intc + int8 + int3d + int32 + int2d + int16 + int + insertion + input + IN_f + imrep2ss + impl + im_inv + imag + ilib_gen_Make + ilib_gen_loader + ilib_gen_gateway + ilib_for_link + ilib_compile + ilib_build + iirlp + iirgroup + iir + IFTHEL_f + ieee + iconvert + hypermatrices + hypermat + htrianr + hrmt + householder + hotcolormap + host + horner + h_norm + histplot + hist3d + h_inf_st + h_inf + hilb + hex2dec + hess + hermit + %helps + help + h_cl + havewindow + hat + hankelsv + hank + hamilton + HALT_f + halt + h2norm + gtild + gstacksize + gspec + gsort + gschur + group + gr_menu + grep + graypolarplot + grayplot + graycolormap + graph_union + graph_sum + graph_simp + graph_power + graph-list + Graphics + graph_diameter + graph_complement + graph_center + graph_2_mat + grand + graduate + gpeche + g_margin + G_make + global + glist + glever + givens + girth + gfrancis + gfare + getversion + getvalue + getsymbol + getscicosvars + getpid + GetMsg + getmark + getlinestyle + getio + get_function_path + getfont + getfield + getf + getenv + getdate + getd + getcwd + getcolor + getblocklabel + get + geom3d + GENSQR_f + GENSIN_f + gen_net + genmarkov + genlib + genfac3d + GENERIC_f + GENERAL_f + gcf + gcd + gcare + gammaln + gamma + gamitg + gainplot + GAIN_f + GAINBLK_f + fusee + funptr + funcprot + fun2string + fullrfk + fullrf + full + fstair + fstabst + fspecg + fsolve + fsfirlin + fscanfMat + fscanf + frmag + frfit + frexp + freson + freq + frep2tf + fprintfMat + fprintf + fplot3d1 + fplot3d + fplot2d + fourplan + fort + formatman + format + flts + floor + fix + fit_dat + find_path + findobj + findm + find_freq + find + filter + fileinfo + file + figure + fgrayplot + fft + ffilt + feval + feedback + fec + fcontour2d + fcontour + fchamp + faurre + factors + fac3d + eye + extraction + external + expm + EXPBLK_f + exp + exit + exists + execstr + ExecScilab + ExeclScilab + ExecAppli + exec + excel2sci + Example + EVTGEN_f + EVTDLY_f + evstr + EVENTSCOPE_f + evans + eval3dp + eval3d + eval + error + errclear + errcatch + errbar + erfcx + erfc + erf + ereduc + equil1 + equil + equal + eqiir + eqfir + emptystr + empty + ell1mag + eigenmarkov + edit_curv + edit + edge_number + dtsi + dt_ility + dsimul + dscr + driver + drawaxis + dragrect + double + dot + DLSS_f + DLR_f + DLRADAPT_f + dlgamma + dispfile + dispbpt + disp + diophant + diary + diag + dhnorm + dft + detr + determ + det + DestroyLink + des2tf + des2ss + derivative- + derivat + denom + DEMUX_f + demos + delmenu + delip + delete_nodes + delete_arcs + delbpt + DELAYV_f + DELAY_f + degree + deff + dec2hex + debug + ddp + dcf + dbphi + date + datafit + dassl + dasrt + czt + cycle_basis + CURV_f + curblock + cumsum + cumprod + ctr_gram + cspect + csim + CreateLink + cothm + coth + cotg + cosm + coshm + cosh + COSBLK_f + cos + corr + copfac + convstr + convol + convex_hull + contrss + contract_edge + contr + contourf + contour2di + contour2d + contour + cont_mat + cont_frm + CONST_f + con_nodes + connex + conj + cond + companion + comp + Communications + colregul + colormap + colon + colnew + colinout + colcompr + colcomp + coffg + coff + coeff + code2str + cmndred + cmb_lin + CLSS_f + cls2dls + CLR_f + close + CLOCK_f + CLKSPLIT_f + CLKSOMV_f + CLKSOM_f + CLKOUTV_f + CLKOUT_f + CLKINV_f + CLKIN_f + c_link + CLINDUMMY_f + clearglobal + clearfun + clear + clean + classmarkov + circuit + chsolve + chol + chfact + chepol + check_graph + cheb2mag + cheb1mag + chdir + chart + champ1 + champ + chaintest + chain_struct + cepstrum + ceil + cdft + cdfpoi + cdfnor + cdfnbn + cdfgam + cdffnc + cdff + cdfchn + cdfchi + cdfbin + cdfbet + ccontrg + casc + canon + call + calfrq + calerf + cainv + bvode + buttmag + bstap + boucle + boolean + bool2s + bode + bloc2ss + bloc2exp + black + binomial + bilin + BIGSOM_f + bifish + bezout + best_match + bessely + besselk + besselj + besseli + bdiag + bandwr + balreal + balanc + backslash + auwrite + auread + augment + atanm + atanhm + atanh + atan + %asn + asinm + asinhm + asinh + asin + ascii + articul + artest + arsimul + armax1 + armax + armac + arma2p + arma + arl2 + arhnk + argn + arc_number + arc_graph + apropos + ans + ANIMXY_f + ANDLOG_f + and + analyze + analpf + amell + alufunctions + AFFICH_f + aff2ab + adj_lists + adj2sp + add_node + addmenu + addinter + addf + add_edge + addcolor + AdCommunications + acosm + acoshm + acosh + acos + ABSBLK_f + abs + abinv + abcd + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sgml.xml b/kate/data/sgml.xml new file mode 100644 index 000000000..2292c3195 --- /dev/null +++ b/kate/data/sgml.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sieve.xml b/kate/data/sieve.xml new file mode 100644 index 000000000..95ef08b1d --- /dev/null +++ b/kate/data/sieve.xml @@ -0,0 +1,67 @@ + + + + + + + require + if + elsif + else + discard + stop + fileinto + keep + reject + redirect + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sml.xml b/kate/data/sml.xml new file mode 100644 index 000000000..eeae780fc --- /dev/null +++ b/kate/data/sml.xml @@ -0,0 +1,104 @@ + + + + + + abstype + and + andalso + as + case + do + datatype + else + end + eqtype + exception + false + fn + fun + functor + handle + if + in + include + infix + infixr + let + local + nonfix + of + op + open + orelse + raise + rec + sharing + sig + signature + struct + structure + then + true + type + val + where + with + withtype + while + + + unit + int + real + char + string + substring + word + ref + array + vector + bool + list + option + order + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/spice.xml b/kate/data/spice.xml new file mode 100644 index 000000000..03b183acf --- /dev/null +++ b/kate/data/spice.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sql-mysql.xml b/kate/data/sql-mysql.xml new file mode 100644 index 000000000..4c0a99706 --- /dev/null +++ b/kate/data/sql-mysql.xml @@ -0,0 +1,476 @@ + + + + + + + ACCESS + ADD + ALL + ALTER + ANALYZE + AND + AS + ASC + AUTO_INCREMENT + BDB + BERKELEYDB + BETWEEN + BOTH + BY + CASCADE + CASE + CHANGE + + CHARSET + COLUMN + COLUMNS + CONSTRAINT + CREATE + CROSS + CURRENT_DATE + CURRENT_TIME + CURRENT_TIMESTAMP + DATABASE + DATABASES + DAY_HOUR + DAY_MINUTE + DAY_SECOND + DEC + DEFAULT + DELAYED + DELETE + DESC + DESCRIBE + DISTINCT + DISTINCTROW + DROP + ELSE + ENCLOSED + ESCAPED + EXISTS + EXPLAIN + FIELDS + FOR + FOREIGN + FROM + FULLTEXT + FUNCTION + GRANT + GROUP + HAVING + HIGH_PRIORITY + IF + IGNORE + IN + INDEX + INFILE + INNER + INNODB + INSERT + INTERVAL + INTO + IS + JOIN + KEY + KEYS + KILL + LEADING + LEFT + LIKE + LIMIT + LINES + LOAD + LOCK + LOW_PRIORITY + MASTER_SERVER_ID + MATCH + MRG_MYISAM + NATURAL + NATIONAL + NOT + NULL + NUMERIC + ON + OPTIMIZE + OPTION + OPTIONALLY + OR + ORDER + OUTER + OUTFILE + PARTIAL + PRECISION + PRIMARY + PRIVILEGES + PROCEDURE + PURGE + READ + REFERENCES + REGEXP + RENAME + REPLACE + REQUIRE + RESTRICT + RETURNS + REVOKE + RIGHT + RLIKE + SELECT + SET + SHOW + SONAME + SQL_BIG_RESULT + SQL_CALC_FOUND_ROWS + SQL_SMALL_RESULT + SSL + STARTING + STRAIGHT_JOIN + STRIPED + TABLE + TABLES + TERMINATED + THEN + TO + TRAILING + TRUNCATE + TYPE + UNION + UNIQUE + UNLOCK + UNSIGNED + UPDATE + USAGE + USE + USER_RESOURCES + USING + VALUES + VARYING + WHEN + WHERE + WITH + WRITE + XOR + YEAR_MONTH + ZEROFILL + + + + + - + * + / + || + = + != + <> + < + <= + > + >= + ~= + ^= + := + => + ** + .. + + + + ASCII + ORD + CONV + BIN + OCT + HEX + CHAR + CONCAT + CONCAT_WS + LENGTH + OCTET_LENGTH + CHAR_LENGTH + CHARACTER_LENGTH + BIT_LENGTH + LOCATE + POSITION + INSTR + LPAD + RPAD + LEFT + RIGHT + SUBSTRING + SUBSTRING_INDEX + MID + LTRIM + RTRIM + TRIM + SOUNDEX + SPACE + REPLACE + REPEAT + REVERSE + INSERT + ELT + FIELD + FIND_IN_SET + MAKE_SET + EXPORT_SET + LCASE + LOWER + UCASE + UPPER + LOAD_FILE + QUOTE + + ABS + SIGN + MOD + FLOOR + CEILING + ROUND + EXP + LN + LOG + LOG2 + LOG10 + POW + POWER + SQRT + PI + COS + SIN + TAN + ACOS + ASIN + ATAN + ATAN2 + COT + RAND + LEAST + GREATEST + DEGREES + RADIANS + + DAYOFWEEK + WEEKDAY + DAYOFMONTH + DAYOFYEAR + MONTH + DAYNAME + MONTHNAME + QUARTER + WEEK + YEAR + YEARWEEK + HOUR + MINUTE + SECOND + PERIOD_ADD + PERIOD_DIFF + DATE_ADD + DATE_SUB + ADDDATE + SUBDATE + EXTRACT + TO_DAYS + FROM_DAYS + DATE_FORMAT + TIME_FORMAT + CURDATE + CURRENT_DATE + CURTIME + CURRENT_TIME + NOW + SYSDATE + CURRENT_TIMESTAMP + UNIX_TIMESTAMP + FROM_UNIXTIME + SEC_TO_TIME + TIME_TO_SEC + + CAST + CONVERT + + BIT_COUNT + DATABASE + USER + SYSTEM_USER + SESSION_USER + PASSWORD + ENCRYPT + ENCODE + DECODE + MD5 + SHA1 + SHA + AES_ENCRYPT + AES_DECRYPT + DES_ENCRYPT + DES_DECRYPT + LAST_INSERT_ID + FORMAT + VERSION + CONNECTION_ID + GET_LOCK + RELEASE_LOCK + IS_FREE_LOCK + BENCHMARK + INET_NTOA + INET_ATON + MASTER_POS_WAIT + FOUND_ROWS + + COUNT + AVG + MIN + MAX + SUM + STD + STDDEV + BIT_OR + BIT_AND + + + + CHAR + CHARACTER + VARCHAR + BINARY + VARBINARY + TINYBLOB + MEDIUMBLOB + BLOB + LONGBLOB + TINYTEXT + MEDIUMTEXT + TEXT + LONGTEXT + ENUM + + + BIT + BOOL + BOOLEAN + TINYINT + SMALLINT + MEDIUMINT + MIDDLEINT + INT + INTEGER + BIGINT + FLOAT + DOUBLE + REAL + DECIMAL + DEC + FIXED + NUMERIC + LONG + SERIAL + + DATE + DATETIME + TIME + TIMESTAMP + YEAR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sql-postgresql.xml b/kate/data/sql-postgresql.xml new file mode 100644 index 000000000..d4b347533 --- /dev/null +++ b/kate/data/sql-postgresql.xml @@ -0,0 +1,797 @@ + + + + + + + ABORT + ACCESS + ACTION + ADD + ADMIN + AFTER + AGGREGATE + ALIAS + ALL + ALLOCATE + ALTER + ANALYSE + ANALYZE + ANY + ARE + AS + ASC + ASENSITIVE + ASSERTION + ASSIGNMENT + ASYMMETRIC + AT + ATOMIC + AUTHORIZATION + BACKWARD + BEFORE + BEGIN + BETWEEN + BINARY + BOTH + BREADTH + BY + C + CACHE + CALL + CALLED + CARDINALITY + CASCADE + CASCADED + CASE + CAST + CATALOG + CATALOG_NAME + CHAIN + CHAR_LENGTH + CHARACTER_LENGTH + CHARACTER_SET_CATALOG + CHARACTER_SET_NAME + CHARACTER_SET_SCHEMA + CHARACTERISTICS + CHECK + CHECKED + CHECKPOINT + CLASS + CLASS_ORIGIN + CLOB + CLOSE + CLUSTER + COALESCE + COBOL + COLLATE + COLLATION + COLLATION_CATALOG + COLLATION_NAME + COLLATION_SCHEMA + COLUMN + COLUMN_NAME + COMMAND_FUNCTION + COMMAND_FUNCTION_CODE + COMMENT + COMMIT + COMMITTED + COMPLETION + CONDITION_NUMBER + CONNECT + CONNECTION + CONNECTION_NAME + CONSTRAINT + CONSTRAINT_CATALOG + CONSTRAINT_NAME + CONSTRAINT_SCHEMA + CONSTRAINTS + CONSTRUCTOR + CONTAINS + CONTINUE + CONVERT + COPY + CORRESPONDING + COUNT + CREATE + CREATEDB + CREATEUSER + CROSS + CUBE + CURRENT + CURRENT_DATE + CURRENT_PATH + CURRENT_ROLE + CURRENT_TIME + CURRENT_TIMESTAMP + CURRENT_USER + CURSOR + CURSOR_NAME + CYCLE + DATA + DATABASE + DATE + DATETIME_INTERVAL_CODE + DATETIME_INTERVAL_PRECISION + DAY + DEALLOCATE + DEC + DECIMAL + DECLARE + DEFAULT + DEFERRABLE + DEFERRED + DEFINED + DEFINER + DELETE + DELIMITERS + DEPTH + DEREF + DESC + DESCRIBE + DESCRIPTOR + DESTROY + DESTRUCTOR + DETERMINISTIC + DIAGNOSTICS + DICTIONARY + DISCONNECT + DISPATCH + DISTINCT + DO + DOMAIN + DOUBLE + DROP + DYNAMIC + DYNAMIC_FUNCTION + DYNAMIC_FUNCTION_CODE + EACH + ELSE + ENCODING + ENCRYPTED + END + END-EXEC + EQUALS + ESCAPE + EVERY + EXCEPT + EXCEPTION + EXCLUSIVE + EXEC + EXECUTE + EXISTING + EXISTS + EXPLAIN + EXTERNAL + FETCH + FINAL + FIRST + FOR + FORCE + FOREIGN + FORTRAN + FORWARD + FOUND + FREE + FREEZE + FROM + FULL + FUNCTION + G + GENERAL + GENERATED + GET + GLOBAL + GO + GOTO + GRANT + GRANTED + GROUP + GROUPING + HANDLER + HAVING + HIERARCHY + HOLD + HOST + HOUR + IDENTITY + IGNORE + ILIKE + IMMEDIATE + IMMUTABLE + IMPLEMENTATION + IN + INCREMENT + INDEX + INDICATOR + INFIX + INHERITS + INITIALIZE + INITIALLY + INNER + INOUT + INPUT + INSENSITIVE + INSERT + INSTANCE + INSTANTIABLE + INSTEAD + INTERSECT + INTERVAL + INTO + INVOKER + IS + ISNULL + ISOLATION + ITERATE + JOIN + K + KEY + KEY_MEMBER + KEY_TYPE + LANCOMPILER + LANGUAGE + LARGE + LAST + LATERAL + LEADING + LEFT + LENGTH + LESS + LEVEL + LIKE + LIMIT + LISTEN + LOAD + LOCAL + LOCALTIME + LOCALTIMESTAMP + LOCATION + LOCATOR + LOCK + LOWER + M + MAP + MATCH + MAX + MAXVALUE + MESSAGE_LENGTH + MESSAGE_OCTET_LENGTH + MESSAGE_TEXT + METHOD + MIN + MINUTE + MINVALUE + MOD + MODE + MODIFIES + MODIFY + MODULE + MONTH + MORE + MOVE + MUMPS + NAME + NAMES + NATIONAL + NATURAL + NEW + NEXT + NO + NOCREATEDB + NOCREATEUSER + NONE + NOT + NOTHING + NOTIFY + NOTNULL + NULL + NULLABLE + NULLIF + NUMBER + NUMERIC + OBJECT + OCTET_LENGTH + OF + OFF + OFFSET + OIDS + OLD + ON + ONLY + OPEN + OPERATION + OPERATOR + OPTION + OPTIONS + ORDER + ORDINALITY + OUT + OUTER + OUTPUT + OVERLAPS + OVERLAY + OVERRIDING + OWNER + PAD + PARAMETER + PARAMETER_MODE + PARAMETER_NAME + PARAMETER_ORDINAL_POSITION + PARAMETER_SPECIFIC_CATALOG + PARAMETER_SPECIFIC_NAME + PARAMETER_SPECIFIC_SCHEMA + PARAMETERS + PARTIAL + PASCAL + PASSWORD + PATH + PENDANT + PLI + POSITION + POSTFIX + PRECISION + PREFIX + PREORDER + PREPARE + PRESERVE + PRIMARY + PRIOR + PRIVILEGES + PROCEDURAL + PROCEDURE + PUBLIC + READ + READS + REAL + RECURSIVE + REF + REFERENCES + REFERENCING + REINDEX + RELATIVE + RENAME + REPEATABLE + REPLACE + RESET + RESTRICT + RESULT + RETURN + RETURNED_LENGTH + RETURNED_OCTET_LENGTH + RETURNED_SQLSTATE + RETURNS + REVOKE + RIGHT + ROLE + ROLLBACK + ROLLUP + ROUTINE + ROUTINE_CATALOG + ROUTINE_NAME + ROUTINE_SCHEMA + ROW + ROW_COUNT + ROWS + RULE + SAVEPOINT + SCALE + SCHEMA + SCHEMA_NAME + SCOPE + SCROLL + SEARCH + SECOND + SECTION + SECURITY + SELECT + SELF + SENSITIVE + SEQUENCE + SERIALIZABLE + SERVER_NAME + SESSION + SESSION_USER + SET + SETOF + SETS + SHARE + SHOW + SIMILAR + SIMPLE + SIZE + SOME + SOURCE + SPACE + SPECIFIC + SPECIFIC_NAME + SPECIFICTYPE + SQL + SQLCODE + SQLERROR + SQLEXCEPTION + SQLSTATE + SQLWARNING + STABLE + START + STATE + STATEMENT + STATIC + STATISTICS + STDIN + STDOUT + STRUCTURE + STYLE + SUBCLASS_ORIGIN + SUBLIST + SUBSTRING + SUM + SYMMETRIC + SYSID + SYSTEM + SYSTEM_USER + TABLE + TABLE_NAME + TEMP + TEMPLATE + TEMPORARY + TERMINATE + THAN + THEN + TIMEZONE_HOUR + TIMEZONE_MINUTE + TO + TOAST + TRAILING + TRANSACTION + TRANSACTION_ACTIVE + TRANSACTIONS_COMMITTED + TRANSACTIONS_ROLLED_BACK + TRANSFORM + TRANSFORMS + TRANSLATE + TRANSLATION + TREAT + TRIGGER + TRIGGER_CATALOG + TRIGGER_NAME + TRIGGER_SCHEMA + TRIM + TRUNCATE + TRUSTED + TYPE + UNCOMMITTED + UNDER + UNENCRYPTED + UNION + UNIQUE + UNKNOWN + UNLISTEN + UNNAMED + UNNEST + UNTIL + UPDATE + UPPER + USAGE + USER + USER_DEFINED_TYPE_CATALOG + USER_DEFINED_TYPE_NAME + USER_DEFINED_TYPE_SCHEMA + USING + VACUUM + VALID + VALUE + VALUES + VARIABLE + VARYING + VERBOSE + VERSION + VIEW + VOLATILE + WHEN + WHENEVER + WHERE + WITH + WITHOUT + WORK + WRITE + YEAR + ZONE + FALSE + TRUE + + + + + - + * + / + || + |/ + ||/ + ! + !! + @ + & + | + # + << + >> + % + ^ + = + != + <> + < + <= + > + >= + ~ + ~* + !~ + !~* + ^= + := + => + ** + .. + AND + OR + NOT + + ## + && + &< + &> + <-> + <^ + >^ + ?# + ?- + ?-| + @-@ + ?| + ?|| + @@ + ~= + + <<= + >>= + + + + ABS + CBRT + CEIL + DEGREES + EXP + FLOOR + LN + LOG + MOD + PI + POW + RADIANS + RANDOM + ROUND + SIGN + SQRT + TRUNC + + ACOS + ASIN + ATAN + ATAN2 + COS + COT + SIN + TAN + + BIT_LENGTH + CHAR_LENGTH + CHARACTER_LENGTH + LOWER + OCTET_LENGTH + POSITION + SUBSTRING + TRIM + UPPER + + ASCII + BTRIM + CHR + CONVERT + INITCAP + LENGTH + LPAD + LTRIM + PG_CLIENT_ENCODING + REPEAT + RPAD + RTRIM + STRPOS + SUBSTR + TO_ASCII + TRANSLATE + ENCODE + DECODE + + TO_CHAR + TO_DATE + TO_TIMESTAMP + TO_NUMBER + + AGE + DATE_PART + DATE_TRUNC + EXTRACT + ISFINITE + NOW + TIMEOFDAY + TIMESTAMP + EXTRACT + + AREA + BOX + CENTER + DIAMETER + HEIGHT + ISCLOSED + ISOPEN + PCLOSE + NPOINT + POPEN + RADIUS + WIDTH + + BOX + CIRCLE + LSEG + PATH + POINT + POLYGON + + BROADCAST + HOST + MASKLEN + SET_MASKLEN + NETMASK + NETWORK + ABBREV + + NEXTVAL + CURRVAL + SETVAL + + COALESCE + NULLIF + + HAS_TABLE_PRIVILEGE + PG_GET_VIEWDEF + PG_GET_RULEDEF + PG_GET_INDEXDEF + PG_GET_USERBYID + OBJ_DESCRIPTION + COL_DESCRIPTION + + AVG + COUNT + MAX + MIN + STDDEV + SUM + VARIANCE + + + LZTEXT + BIGINT + INT2 + INT8 + BIGSERIAL + SERIAL8 + BIT + BIT VARYING + VARBIT + BOOLEAN + BOOL + BOX + BYTEA + CHARACTER + CHAR + CHARACTER VARYING + VARCHAR + CIDR + CIRCLE + DATE + DOUBLE PRECISION + FLOAT8 + INET + INTEGER + INT + INT4 + INTERVAL + LINE + LSEG + MACADDR + MONEY + NUMERIC + DECIMAL + OID + PATH + POINT + POLYGON + REAL + SMALLINT + SERIAL + TEXT + TIME + TIMETZ + TIMESTAMP + TIMESTAMPTZ + TIMESTAMP WITH TIMEZONE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/sql.xml b/kate/data/sql.xml new file mode 100644 index 000000000..70a9f11ce --- /dev/null +++ b/kate/data/sql.xml @@ -0,0 +1,951 @@ + + + + + + + + + ACCESS + ACCOUNT + ADD + ADMIN + ADMINISTER + ADVISE + AFTER + AGENT + ALL + ALL_ROWS + ALLOCATE + ALTER + ANALYZE + ANCILLARY + AND + ANY + ARCHIVE + ARCHIVELOG + AS + ASC + ASSERTION + ASSOCIATE + AT + ATTRIBUTE + ATTRIBUTES + AUDIT + AUTHENTICATED + AUTHID + AUTHORIZATION + AUTOALLOCATE + AUTOEXTEND + AUTOMATIC + BACKUP + BECOME + BEFORE + BEGIN + BEHALF + BETWEEN + BINDING + BITMAP + BLOCK + BLOCK_RANGE + BODY + BOUND + BOTH + BREAK + BROADCAST + BTITLE + BUFFER_POOL + BUILD + BULK + BY + CACHE + CACHE_INSTANCES + CALL + CANCEL + CASCADE + CASE + CATEGORY + CHAINED + CHANGE + CHECK + CHECKPOINT + CHILD + CHOOSE + CHUNK + CLASS + CLEAR + CLONE + CLOSE + CLOSE_CACHED_OPEN_CURSORS + CLUSTER + COALESCE + COLUMN + COLUMNS + COLUMN_VALUE + COMMENT + COMMIT + COMMITTED + COMPATIBILITY + COMPILE + COMPLETE + COMPOSITE_LIMIT + COMPRESS + COMPUTE + CONNECT + CONNECT_TIME + CONSIDER + CONSISTENT + CONSTANT + CONSTRAINT + CONSTRAINTS + CONTAINER + CONTENTS + CONTEXT + CONTINUE + CONTROLFILE + COPY + COST + CPU_PER_CALL + CPU_PER_SESSION + CREATE + CREATE_STORED_OUTLINES + CROSS + CUBE + CURRENT + CURSOR + CYCLE + DANGLING + DATA + DATABASE + DATAFILE + DATAFILES + DBA + DDL + DEALLOCATE + DEBUG + DECLARE + DEFAULT + DEFERRABLE + DEFERRED + DEFINER + DEGREE + DELETE + DEMAND + DESC + DETERMINES + DICTIONARY + DIMENSION + DIRECTORY + DISABLE + DISASSOCIATE + DISCONNECT + DISKGROUP + DISMOUNT + DISTINCT + DISTRIBUTED + DOMAIN + DROP + DYNAMIC + EACH + ELSE + ELSIF + EMPTY + ENABLE + END + ENFORCE + ENTRY + ESCAPE + ESTIMATE + EVENTS + EXCEPT + EXCEPTION + EXCEPTIONS + EXCHANGE + EXCLUDING + EXCLUSIVE + EXEC + EXECUTE + EXISTS + EXPIRE + EXPLAIN + EXPLOSION + EXTENDS + EXTENT + EXTENTS + EXTERNALLY + FAILED_LOGIN_ATTEMPTS + FALSE + FAST + FILE + FILTER + FIRST_ROWS + FLAGGER + FLASHBACK + FLUSH + FOLLOWING + FOR + FORCE + FOREIGN + FREELIST + FREELISTS + FRESH + FROM + FULL + FUNCTION + FUNCTIONS + GENERATED + GLOBAL + GLOBALLY + GLOBAL_NAME + GRANT + GROUP + GROUPS + HASH + HASHKEYS + HAVING + HEADER + HEAP + HIERARCHY + HOUR + ID + IDENTIFIED + IDENTIFIER + IDGENERATORS + IDLE_TIME + IF + IMMEDIATE + IN + INCLUDING + INCREMENT + INCREMENTAL + INDEX + INDEXED + INDEXES + INDEXTYPE + INDEXTYPES + INDICATOR + INITIAL + INITIALIZED + INITIALLY + INITRANS + INNER + INSERT + INSTANCE + INSTANCES + INSTEAD + INTERMEDIATE + INTERSECT + INTO + INVALIDATE + IS + ISOLATION + ISOLATION_LEVEL + JAVA + JOIN + KEEP + KEY + KILL + LABEL + LAYER + LEADING + LEFT + LESS + LEVEL + LIBRARY + LIKE + LIMIT + LINK + LIST + LOCAL + LOCATOR + LOCK + LOCKED + LOGFILE + LOGGING + LOGICAL_READS_PER_CALL + LOGICAL_READS_PER_SESSION + LOGOFF + LOGON + LOOP + MANAGE + MANAGED + MANAGEMENT + MASTER + MATERIALIZED + MAXARCHLOGS + MAXDATAFILES + MAXEXTENTS + MAXINSTANCES + MAXLOGFILES + MAXLOGHISTORY + MAXLOGMEMBERS + MAXSIZE + MAXTRANS + MAXVALUE + METHOD + MEMBER + MERGE + MINIMIZE + MINIMUM + MINEXTENTS + MINUS + MINUTE + MINVALUE + MODE + MODIFY + MONITORING + MOUNT + MOVE + MOVEMENT + MTS_DISPATCHERS + MULTISET + NAMED + NATURAL + NEEDED + NESTED + NESTED_TABLE_ID + NETWORK + NEVER + NEW + NEXT + NLS_CALENDAR + NLS_CHARACTERSET + NLS_COMP + NLS_CURRENCY + NLS_DATE_FORMAT + NLS_DATE_LANGUAGE + NLS_ISO_CURRENCY + NLS_LANG + NLS_LANGUAGE + NLS_NUMERIC_CHARACTERS + NLS_SORT + NLS_SPECIAL_CHARS + NLS_TERRITORY + NO + NOARCHIVELOG + NOAUDIT + NOCACHE + NOCOMPRESS + NOCYCLE + NOFORCE + NOLOGGING + NOMAXVALUE + NOMINIMIZE + NOMINVALUE + NOMONITORING + NONE + NOORDER + NOOVERRIDE + NOPARALLEL + NORELY + NORESETLOGS + NOREVERSE + NORMAL + NOSEGMENT + NOSORT + NOT + NOTHING + NOVALIDATE + NOWAIT + NULL + NULLS + OBJNO + OBJNO_REUSE + OF + OFF + OFFLINE + OID + OIDINDEX + OLD + ON + ONLINE + ONLY + OPCODE + OPEN + OPERATOR + OPTIMAL + OPTIMIZER_GOAL + OPTION + OR + ORDER + ORGANIZATION + OUT + OUTER + OUTLINE + OVER + OVERFLOW + OVERLAPS + OWN + PACKAGE + PACKAGES + PARALLEL + PARAMETERS + PARENT + PARTITION + PARTITIONS + PARTITION_HASH + PARTITION_RANGE + PASSWORD + PASSWORD_GRACE_TIME + PASSWORD_LIFE_TIME + PASSWORD_LOCK_TIME + PASSWORD_REUSE_MAX + PASSWORD_REUSE_TIME + PASSWORD_VERIFY_FUNCTION + PCTFREE + PCTINCREASE + PCTTHRESHOLD + PCTUSED + PCTVERSION + PERCENT + PERMANENT + PLAN + PLSQL_DEBUG + POST_TRANSACTION + PREBUILT + PRECEDING + PREPARE + PRESENT + PRESERVE + PREVIOUS + PRIMARY + PRIOR + PRIVATE + PRIVATE_SGA + PRIVILEGE + PRIVILEGES + PROCEDURE + PROFILE + PUBLIC + PURGE + QUERY + QUEUE + QUOTA + RANDOM + RANGE + RBA + READ + READS + REBUILD + RECORDS_PER_BLOCK + RECOVER + RECOVERABLE + RECOVERY + RECYCLE + REDUCED + REFERENCES + REFERENCING + REFRESH + RELY + RENAME + REPLACE + RESET + RESETLOGS + RESIZE + RESOLVE + RESOLVER + RESOURCE + RESTRICT + RESTRICTED + RESUME + RETURN + RETURNING + REUSE + REVERSE + REVOKE + REWRITE + RIGHT + ROLE + ROLES + ROLLBACK + ROLLUP + ROW + ROWNUM + ROWS + RULE + SAMPLE + SAVEPOINT + SCAN + SCAN_INSTANCES + SCHEMA + SCN + SCOPE + SD_ALL + SD_INHIBIT + SD_SHOW + SEGMENT + SEG_BLOCK + SEG_FILE + SELECT + SELECTIVITY + SEQUENCE + SERIALIZABLE + SERVERERROR + SESSION + SESSION_CACHED_CURSORS + SESSIONS_PER_USER + SET + SHARE + SHARED + SHARED_POOL + SHRINK + SHUTDOWN + SINGLETASK + SIZE + SKIP + SKIP_UNUSABLE_INDEXES + SNAPSHOT + SOME + SORT + SOURCE + SPECIFICATION + SPLIT + SQL_TRACE + STANDBY + START + STARTUP + STATEMENT_ID + STATISTICS + STATIC + STOP + STORAGE + STORE + STRUCTURE + SUBMULTISET + SUBPARTITION + SUBPARTITIONS + SUCCESSFUL + SUMMARY + SUPPLEMENTAL + SUSPEND + SWITCH + SYS_OP_BITVEC + SYS_OP_ENFORCE_NOT_NULL$ + SYS_OP_NOEXPAND + SYS_OP_NTCIMG$ + SYNONYM + SYSDBA + SYSOPER + SYSTEM + TABLE + TABLES + TABLESPACE + TABLESPACE_NO + TABNO + TEMPFILE + TEMPORARY + THAN + THE + THEN + THREAD + THROUGH + TIMEOUT + TIMEZONE_HOUR + TIMEZONE_MINUTE + TIME_ZONE + TO + TOPLEVEL + TRACE + TRACING + TRAILING + TRANSACTION + TRANSITIONAL + TRIGGER + TRIGGERS + TRUE + TRUNCATE + TYPE + TYPES + UNARCHIVED + UNBOUND + UNBOUNDED + UNDO + UNIFORM + UNION + UNIQUE + UNLIMITED + UNLOCK + UNRECOVERABLE + UNTIL + UNUSABLE + UNUSED + UPD_INDEXES + UPDATABLE + UPDATE + UPPPER + USAGE + USE + USE_STORED_OUTLINES + USER_DEFINED + USING + VALIDATE + VALIDATION + VALUES + VIEW + WHEN + WHENEVER + WHERE + WITH + WITHOUT + WORK + WRITE + + + + + - + * + / + || + = + != + <> + < + <= + > + >= + ~= + ^= + := + => + ** + .. + + + ABS + ACOS + ADD_MONTHS + ASCII + ASCIISTR + ASIN + ATAN + ATAN2 + AVG + BFILENAME + BIN_TO_NUM + BITAND + CARDINALITY + CAST + CEIL + CHARTOROWID + CHR + COALESCE + COLLECT + COMPOSE + CONCAT + CONVERT + CORR + CORR_K + CORR_S + COS + COSH + COUNT + COVAR_POP + COVAR_SAMP + CUME_DIST + CURRENT_DATE + CURRENT_TIMESTAMP + CV + DBTIMEZONE + DECODE + DECOMPOSE + DENSE_RANK + DEPTH + DEREF + DUMP + EMPTY_BLOB + EMPTY_CLOB + EXISTSNODE + EXP + EXTRACT + EXTRACTVALUE + FIRST + FIRST_VALUE + FLOOR + FROM_TZ + GREATEST + GROUP_ID + GROUPING + GROUPING_ID + HEXTORAW + INITCAP + INSTR + INSTRB + LAG + LAST + LAST_DAY + LAST_VALUE + LEAD + LEAST + LENGTH + LENGTHB + LN + LNNVL + LOCALTIMESTAMP + LOG + LOWER + LPAD + LTRIM + MAKE_REF + MAX + MEDIAN + MIN + MOD + MONTHS_BETWEEN + NANVL + NCHR + NEW_TIME + NEXT_DAY + NLS_CHARSET_DECL_LEN + NLS_CHARSET_ID + NLS_CHARSET_NAME + NLS_INITCAP + NLS_LOWER + NLS_UPPER + NLSSORT + NTILE + NULLIF + NUMTODSINTERVAL + NUMTOYMINTERVAL + NVL + NVL2 + ORA_HASH + ORA_ROWSCN + PERCENT_RANK + PERCENTILE_CONT + PERCENTILE_DISC + POWER + POWERMULTISET + POWERMULTISET_BY_CARDINALITY + PRESENTNNV + PRESENTV + RANK + RATIO_TO_REPORT + RAWTOHEX + RAWTONHEX + REF + REFTOHEX + REGEXP_INSTR + REGEXP_LIKE + REGEXP_REPLACE + REGEXP_SUBSTR + REGR_SLOPE + REGR_INTERCEPT + REGR_COUNT + REGR_R2 + REGR_AVGX + REGR_AVGY + REGR_SXX + REGR_SYY + REGR_SXY + REMAINDER + ROUND + ROW_NUMBER + ROWIDTOCHAR + ROWIDTONCHAR + RPAD + RTRIM + SCN_TO_TIMESTAMP + SESSIONTIMEZONE + SIGN + SIN + SINH + SOUNDEX + SQRT + STATS_BINOMIAL_TEST + STATS_CROSSTAB + STATS_F_TEST + STATS_KS_TEST + STATS_MODE + STATS_MW_TEST + STATS_ONE_WAY_ANOVA + STATS_T_TEST_ONE + STATS_T_TEST_PAIRED + STATS_T_TEST_INDEP + STATS_T_TEST_INDEPU + STATS_WSR_TEST + STDDEV + STDDEV_POP + STDDEV_SAMP + SUBSTR + SUBSTRB + SUM + SYS_CONNECT_BY_PATH + SYS_CONTEXT + SYS_DBURIGEN + SYS_EXTRACT_UTC + SYS_GUID + SYS_TYPEID + SYS_XMLAGG + SYS_XMLGEN + SYSDATE + SYSTIMESTAMP + TAN + TANH + TIMESTAMP_TO_SCN + TO_BINARY_DOUBLE + TO_BINARY_FLOAT + TO_CHAR + TO_CLOB + TO_DATE + TO_DSINTERVAL + TO_LOB + TO_MULTI_BYTE + TO_NCHAR + TO_NCLOB + TO_NUMBER + TO_SINGLE_BYTE + TO_TIMESTAMP + TO_TIMESTAMP_TZ + TO_YMINTERVAL + TRANSLATE + TREAT + TRIM + TRUNC + TZ_OFFSET + UID + UNISTR + UPDATEXML + UPPER + USER + USERENV + VALUE + VAR_POP + VAR_SAMP + VARIANCE + VSIZE + WIDTH_BUCKET + XMLAGG + XMLCOLATTVAL + XMLCONCAT + XMLELEMENT + XMLFOREST + XMLSEQUENCE + XMLTRANSFORM + + + ANYDATA + ANYDATASET + ANYTYPE + ARRAY + BFILE + BINARY_DOUBLE + BINARY_FLOAT + BINARY_INTEGER + BLOB + BOOLEAN + CFILE + CHAR + CHARACTER + CLOB + DATE + DAY + DBURITYPE + DEC + DECIMAL + DOUBLE + FLOAT + FLOB + HTTPURITYPE + INT + INTEGER + INTERVAL + LOB + LONG + MLSLABEL + MONTH + NATIONAL + NCHAR + NCLOB + NUMBER + NUMERIC + NVARCHAR + OBJECT + PLS_INTEGER + PRECISION + RAW + RECORD + REAL + ROWID + SECOND + SINGLE + SMALLINT + TIME + TIMESTAMP + URIFACTORYTYPE + URITYPE + UROWID + VARCHAR + VARCHAR2 + VARYING + VARRAY + XMLTYPE + YEAR + ZONE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/stata.xml b/kate/data/stata.xml new file mode 100644 index 000000000..c8eb2499f --- /dev/null +++ b/kate/data/stata.xml @@ -0,0 +1,478 @@ + + + + + + about + ado + adjust + alpha + anova + anovadef + append + assert + arch + areg + args + arima + bar + binreg + biprobit + bitest + boxcox + brier + break + browse + bstrap + by + canon + cap + capture + cat + cd + centile + cf + checksum + ci + clavg + class + clist + clcomp + clear + clgen + clkmeans + clkmed + clnote + clogit + cloglog + clsing + cltree + cluster + clutil + cmdlog + cnreg + cnsreg + creturn + codebook + collapse + compare + compress + confirm + constraint + contract + continue + copy + copyright + corr2data + corr + correlate + corrgram + count + cox + cross + ct + ctset + cttost + cumsp + cumul + cusum + datatypes + decode + define + describe + destring + dfuller + diagplots + dir + discard + di + display + do + doedit + dotplot + drawnorm + drop + dstdize + edit + egen + eivreg + else + encode + end + epitab + erase + ereturn + exit + expand + export + factor + fdadescribe + fdasave + fdause + fillin + file + filefilter + flist + for + foreach + forv + forval + forvalues + format + fracpoly + g + gen + generate + gettoken + glm + glogit + gprefs + gr7 + graph7 + gr + graph + grmeanby + gsort + hadimvo + hausman + haver + heckman + heckprob + help + hetprob + hexdump + hilite + hist + hotel + if + icd9 + impute + in + infile + infile1 + infile2 + infiling + infix + input + insheet + inspect + ipolate + ivreg + jknife + joinby + kappa + kdensity + keep + ksm + ksmirnov + kwallis + label + ladder + levels + limits + lincom + line + linktest + list + lnskew0 + log + logistic + lowess + lfit + lstat + lroc + lsens + logit + loneway + lrtest + ltable + lv + manova + manovatest + mark + markin + markout + marksample + matsize + maximize + means + median + memory + merge + mfx + mkdir + mkspline + ml + mleval + mlmatbysum + mlmatsum + mlsum + mlvecsum + mlogit + more + move + mvencode + mvreg + nbreg + net + newey + news + nl + nlogit + nobreak + nois + noisily + notes + nptrend + numlist + obs + odbc + ologit + oneway + oprobit + order + orthog + outfile + outsheet + parse + pcorr + _pctile + pctile + pergram + pk + pkcollapse + pkcross + pkequiv + pkexamine + pkshape + pksumm + plot + poisson + post + postclose + postfile + postutil + pperron + prais + predict + preserve + probit + program + prtest + pwcorr + qc + qreg + quadchk + query + qui + quietly + ranksum + range + recast + recode + reg3 + regdiag + reg + regress + rename + replace + reshape + restore + return + roc + rocplot + rotate + rreg + runtest + run + sample + sampsi + save + scatter + scobit + score + sdtest + search + separate + serrbar + set + shell + signrank + signtest + simul + sktest + smooth + snapspan + sort + spearman + spikeplot + sreturn + st + stack + statsby + stb + stbase + stci + stcox + stdes + stem + stfill + stgen + stir + stphplot + stptime + strate + streg + sts + stset + stsplit + stsum + sttocc + sttoct + stvary + sum + summarize + sureg + svy + svydes + svylc + svymean + svyset + svytab + svytest + sw + swilk + symmetry + syntax + tab + table + tabdisp + tabstat + tabsum + tabulate + tempname + tempvar + tempfile + test + testnl + tobit + tokenize + translate + translator + transmap + treatreg + truncreg + tsreport + tsrevar + tsset + ttest + tutorials + twoway + type + unabcmd + unabbr + update + use + using + version + vce + view + vwls + weibull + whelp + while + which + wntestb + wntestq + xcorr + xi + xpose + xt + xtabond + xtclog + xtdata + xtdes + xtgee + xtgls + xtintreg + xtile + xtivreg + xtlogit + xtnbreg + xtpcse + xtpois + xtprobit + xtrchh + xtreg + xtregar + xtsum + xttab + xttobit + zip + + + char + double + error + text + result + float + int + long + local + global + macro + mat + matrix + scalar + variable + var + varlist + varname + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/syntax.template b/kate/data/syntax.template new file mode 100644 index 000000000..1e6e571a5 --- /dev/null +++ b/kate/data/syntax.template @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + diff --git a/kate/data/tcl.xml b/kate/data/tcl.xml new file mode 100644 index 000000000..18a270822 --- /dev/null +++ b/kate/data/tcl.xml @@ -0,0 +1,490 @@ + + + + + + + + + + + after + append + AppleScript + argv + argc + array + auto_execk + auto_load + auto_mkindex + auto_path + auto_reset + beep + bell + binary + bind + bindtags + bgerror + break + button + canvas + case + catch + cd + checkbutton + clipboard + clock + close + concat + console + continue + dde + destroy + else + elseif + encoding + entry + env + eof + error + errorCode + errorInfo + eval + event + exec + exit + expr + fblocked + fconfigure + fcopy + file + fileevent + flush + focus + font + for + foreach + format + frame + gets + glob + global + grab + grid + history + if + image + incr + info + interp + join + label + lappend + lindex + linsert + list + listbox + llength + load + lower + lrange + lreplace + lsearch + lsort + menu + menubutton + message + namespace + open + option + OptProc + pack + package + parray + pid + place + pkg_mkindex + proc + puts + pwd + radiobutton + raise + read + regexp + registry + regsub + rename + resource + return + scale + scan + scrollbar + seek + selection + send + set + socket + source + split + string + subst + switch + tclLog + tcl_endOfWord + tcl_findLibrary + tcl_library + tcl_patchLevel + tcl_platform + tcl_precision + tcl_rcFileName + tcl_rcRsrcName + tcl_startOfNextWord + tcl_startOfPreviousWord + tcl_traceCompile + tcl_traceExec + tcl_version + tcl_wordBreakAfter + tcl_wordBreakBefore + tell + text + time + tk + tkTabToWindow + tkwait + tk_chooseColor + tk_chooseDirectory + tk_focusFollowMouse + tk_focusNext + tk_focusPrev + tk_getOpenFile + tk_getSaveFile + tk_library + tk_messageBox + tk_optionMenu + tk_patchLevel + tk_popup + tk_strictMotif + tk_version + toplevel + trace + unknown + unset + update + uplevel + upvar + variable + vwait + while + winfo + wm + + + + add + args + atime + attributes + body + bytelength + cancel + channels + clicks + cmdcount + commands + compare + complete + convertfrom + convertto + copy + default + delete + dirname + equal + executable + exists + extension + first + forget + format + functions + globals + hostname + idle + ifneeded + index + info + is + isdirectory + isfile + join + last + length + level + library + link + loaded + locals + lstat + map + match + mkdir + mtime + nameofexecutable + names + nativename + normalize + number + owned + patchlevel + pathtype + present + procs + provide + range + readable + readlink + remove + rename + repeat + replace + require + rootname + scan + script + seconds + separator + sharedlibextension + size + split + stat + system + tail + tclversion + tolower + totitle + toupper + trim + trimleft + trimright + type + unknown + variable + vars + vcompare + vdelete + versions + vinfo + volumes + vsatisfies + wordend + wordstart + writable + + activate + actual + addtag + append + appname + aspect + atom + atomname + bbox + bind + broadcast + canvasx + canvasy + caret + cells + cget + children + class + clear + client + clone + colormapfull + colormapwindows + command + configure + containing + coords + create + current + curselection + dchars + debug + deiconify + delta + depth + deselect + dlineinfo + dtag + dump + edit + entrycget + entryconfigure + families + find + flash + focus + focusmodel + fpixels + fraction + frame + generate + geometry + get + gettags + grid + group + handle + height + hide + iconbitmap + iconify + iconmask + iconname + iconposition + iconwindow + icursor + id + identify + image + insert + interps + inuse + invoke + ismapped + itemcget + itemconfigure + keys + lower + manager + mark + maxsize + measure + metrics + minsize + move + name + nearest + overrideredirect + own + panecget + paneconfigure + panes + parent + pathname + pixels + pointerx + pointerxy + pointery + positionfrom + post + postcascade + postscript + protocol + proxy + raise + release + reqheight + reqwidth + resizable + rgb + rootx + rooty + scale + scaling + screen + screencells + screendepth + screenheight + screenmmheight + screenmmwidth + screenvisual + screenwidth + search + see + select + selection + server + set + show + sizefrom + stackorder + state + status + tag + title + toplevel + transient + types + unpost + useinputmethods + validate + values + viewable + visual + visualid + visualsavailable + vrootheight + vrootwidth + vrootx + vrooty + width + window + windowingsystem + withdraw + x + xview + y + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/tibasic.xml b/kate/data/tibasic.xml new file mode 100644 index 000000000..0b2d67dbd --- /dev/null +++ b/kate/data/tibasic.xml @@ -0,0 +1,71 @@ + + + + + + If + Then + Else + For + While + Repeat + End + Pause + Lbl + Goto + IS> + DS< + Menu + prgm + Return + DelVar + GraphStyle + Input + Prompt + Disp + DispGraph + DispTable + Output + getKey + ClrHome + ClrTable + GetCalc + Get + Send + prgm + + + net + eogt + eolt + sqrt + %THETA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/txt2tags.xml b/kate/data/txt2tags.xml new file mode 100644 index 000000000..61dc77e62 --- /dev/null +++ b/kate/data/txt2tags.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/uscript.xml b/kate/data/uscript.xml new file mode 100644 index 000000000..5f4d6d8d9 --- /dev/null +++ b/kate/data/uscript.xml @@ -0,0 +1,186 @@ + + + + + + break + continue + if + else + switch + while + for + do + foreach + true + false + null + new + instanceof + state + auto + exec + function + defaultproperties + native + noexport + var + out + local + event + return + static + Static + synchronized + transient + volatile + final + throws + extends + expands + public + protected + private + abstract + case + default + final + simulated + Dot + nativereplication + replication + unreliable + reliable + ignores + localized + latent + singular + Cross + config + enum + struct + operator + preoperator + postoperator + iterator + coerce + optional + const + editconst + array + export + editinline + editinlinenew + editinlineuse + cpptext + placeable + virtual + hidecategories + super + global + none + self + + + + boolean + char + byte + short + int + long + float + double + void + Pawn + sound + ipaddr + ELightType + actor + ammo + bool + vector + rotator + name + string + object + plane + staticmesh + package + color + coords + material + class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/velocity.xml b/kate/data/velocity.xml new file mode 100644 index 000000000..dc2424ec5 --- /dev/null +++ b/kate/data/velocity.xml @@ -0,0 +1,51 @@ + + + + + + #set + #foreach + #end + #if + #else + #elseif + #parse + #macro + #stop + #include + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/verilog.xml b/kate/data/verilog.xml new file mode 100644 index 000000000..c7795c1a0 --- /dev/null +++ b/kate/data/verilog.xml @@ -0,0 +1,227 @@ + + + + + + module + macromodule + endmodule + task + endtask + function + endfunction + table + endtable + specify + specparam + endspecify + case + casex + casez + endcase + fork + join + + defparam + default + begin + end + if + ifnone + else + forever + while + for + wait + repeat + disable + + assign + deassign + force + release + + always + initial + edge + posedge + negedge + + + + + strong0 + strong1 + pull0 + pull1 + weak0 + weak1 + highz0 + highz1 + + small + medium + large + + + + pullup + pulldown + cmos + rcmos + nmos + pmos + rnmos + rpmos + and + nand + or + nor + xor + xnor + not + buf + tran + rtran + tranif0 + tranif1 + rtranif0 + rtranif1 + bufif0 + bufif1 + notif0 + notif1 + + + + + input + output + inout + + wire + tri + tri0 + tri1 + wand + wor + triand + trior + supply0 + supply1 + + reg + integer + real + realtime + time + + vectored + scalared + trireg + + parameter + event + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/vhdl.xml b/kate/data/vhdl.xml new file mode 100644 index 000000000..8dd836cd1 --- /dev/null +++ b/kate/data/vhdl.xml @@ -0,0 +1,286 @@ + + + + + + access + after + alias + all + assert + architecture + begin + block + body + buffer + bus + case + component + configuration + constant + disconnect + downto + else + elsif + end + entity + exit + file + for + function + generate + generic + group + guarded + if + impure + in + inertial + inout + is + label + library + linkage + literal + loop + map + new + next + null + of + on + open + others + out + package + port + postponed + procedure + process + pure + range + record + register + reject + report + return + select + severity + signal + shared + subtype + then + to + transport + type + unaffected + units + until + use + variable + wait + when + while + with + note + warning + error + failure + ACCESS + AFTER + ALIAS + ALL + ASSERT + ARCHITECTURE + BEGIN + BLOCK + BODY + BUFFER + BUS + CASE + COMPONENT + CONFIGURATION + CONSTANT + DISCONNECT + DOWNTO + ELSE + ELSIF + END + ENTITY + EXIT + FILE + FOR + FUNCTION + GENERATE + GENERIC + GROUP + GUARDED + IF + IMPURE + IN + INERTIAL + INOUT + IS + LABEL + LIBRARY + LINKAGE + LITERAL + LOOP + MAP + NEW + NEXT + NULL + OF + ON + OPEN + OTHERS + OUT + PACKAGE + PORT + POSTPONED + PROCEDURE + PROCESS + PURE + RANGE + RECORD + REGISTER + REJECT + REPORT + RETURN + SELECT + SEVERITY + SIGNAL + SHARED + SUBTYPE + THEN + TO + TRANSPORT + TYPE + UNAFFECTED + UNITS + UNTIL + USE + VARIABLE + WAIT + WHEN + WHILE + WITH + NOTE + WARNING + ERROR + FAILURE + and + or + xor + not + AND + OR + XOR + NOT + + + bit + bit_vector + character + boolean + integer + real + time + string + severity_level + positive + natural + signed + unsigned + line + text + std_logic + std_logic_vector + std_ulogic + std_ulogic_vector + qsim_state + qsim_state_vector + qsim_12state + qsim_12state_vector + qsim_strength + mux_bit + mux_vector + reg_bit + reg_vector + wor_bit + wor_vector + BIT + BIT_VECTOR + CHARACTER + BOOLEAN + INTEGER + REAL + TIME + STRING + SEVERITY_LEVEL + POSITIVE + NATURAL + SIGNED + UNSIGNED + LINE + TEXT + STD_LOGIC + STD_LOGIC_VECTOR + STD_ULOGIC + STD_ULOGIC_VECTOR + QSIM_STATE + QSIM_STATE_VECTOR + QSIM_12STATE + QSIM_12STATE_VECTOR + QSIM_STRENGTH + MUX_BIT + MUX_VECTOR + REG_BIT + REG_VECTOR + WOR_BIT + WOR_VECTOR + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/vrml.xml b/kate/data/vrml.xml new file mode 100644 index 000000000..42012ca47 --- /dev/null +++ b/kate/data/vrml.xml @@ -0,0 +1,139 @@ + + + + + + DEF + EXTERNPROTO + FALSE + IS + NULL + PROTO + ROUTE + TO + TRUE + USE + eventIn + eventOut + exposedField + field + + + MFColor + MFFloat + MFInt32 + MFNode + MFRotation + MFString + MFTime + MFVec2f + MFVec3f + SFBool + SFColor + SFFloat + SFImage + SFInt32 + SFNode + SFRotation + SFString + SFTime + SFVec2f + SFVec3f + + + Anchor + AudioClip + Appearance + Background + Billboard + Box + Collision + Color + ColorInterpolator + Cone + Coordinate + CoordinateInterpolator + Cylinder + CylinderSensor + DirectionalLight + ElevationGrid + Extrusion + Fog + FontStyle + Group + ImageTexture + IndexedFaceSet + IndexedLineSet + Inline + LOD + Material + MovieTexture + NavigationInfo + Normal + NormalInterpolator + OrientationInterpolator + PixelTexture + Plane + PlaneSensor + PointLight + PointSet + PositionInterpolator + ProximitySensor + ScalarInterpolator + Script + Shape + Sensor + Sound + Sphere + SphereSensor + SpotLight + Switch + Text + TextureCoordinate + TextureTransform + TimeSensor + TouchSensor + Transform + Viewpoint + VisibilitySensor + WorldInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/winehq.xml b/kate/data/winehq.xml new file mode 100644 index 000000000..07919a86a --- /dev/null +++ b/kate/data/winehq.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/xharbour.xml b/kate/data/xharbour.xml new file mode 100644 index 000000000..02ed03ee0 --- /dev/null +++ b/kate/data/xharbour.xml @@ -0,0 +1,543 @@ + + + + + + + local + global + extern + field + each + as + set + clear + screen + databases + all + close + color + date + else + elseif + in + to + do + loop + catch + exit + box + say + case + switch + self + super + say + get + read + use + select + otherwise + index + alias + like + has + return + static + on + off + nil + ? + class + external + + + + FOR + IF + SWITCH + WHILE + TRY + BEGIN + PROCEDURE + FUNCTION + METHOD + + + + NEXT + END + ENDIF + ENDDO + ENDCASE + + + + data + inline + method + classdata + init + from + hidden + + + + INVALID + EXACT + FIXED + DECIMALS + DATEFORMAT + EPOCH + PATH + DEFAULT + EXCLUSIVE + SOFTSEEK + UNIQUE + DELETED + CANCEL + DEBUG + TYPEAHEAD + COLOR + CURSOR + CONSOLE + ALTERNATE + ALTFILE + DEVICE + EXTRA + EXTRAFILE + PRINTER + PRINTFILE + MARGIN + BELL + CONFIRM + ESCAPE + INSERT + EXIT + INTENSITY + SCOREBOARD + DELIMITERS + DELIMCHARS + WRAP + MESSAGE + MCENTER + SCROLLBREAK + EVENTMASK + VIDEOMODE + MBLOCKSIZE + MFILEEXT + STRICTREAD + OPTIMIZE + AUTOPEN + AUTORDER + AUTOSHARE + LANGUAGE + IDLEREPEAT + TRACE + TRACEFILE + TRACESTACK + FILECASE + DIRCASE + DIRSEPARATOR + + + + aadd + adel + achoice + aclone + aeval + ains + ascan + asize + adir + afill + atail + asort + array + TAssociativeArray + + bin21 + bin2l + bin2u + bin2w + i2bin + l2bin + u2bin + w2bin + + eval + fieldblock + fieldwblock + + inkey + lastkey + mcol + mrow + nextkey + + empty + word + descend + __dbdelim + __dbsdf + + os + __run + + alert + browse + dbedit + outerr + outstd + readkey + readvar + __atprompt + __input + __menuto + __nonoallert + __typefile + __xrestscreen + __xsavescreen + + DBAPPEND + DBCLEARFILTER + DBCLOSEALL + DBCLOSEAREA + DBCOMMIT + DBCOMMITALL + DBCREATE + DBDELETE + DBEVAL + DBF + DBFILTER + DBGOBOTTOM + DBGOTO + DBGOTOP + DBRECALL + DBRLOCK + DBRLOCKLIST + DBRUNLOCK + DBSEEK + DBSELECTAREA + DBSETDRIVER + DBSETFILTER + DBSKIP + DBSTRUCT + DBUNLOCK + DBUNLOCKALL + DBUSEAREA + INDEXEXT + INDEXKEY + INDEXORD + ORDBAGEXT + ORDBAGNAME + ORDCONDSET + ORDCREATE + ORDDESTROY + ORDFOR + ORDKEY + ORDLISTADD + ORDLISTCLEAR + ORDLISTREBUILD + ORDNAME + ORDNUMBER + ORDSETFOCUS + RDDLIST + RDDNAME + RDDSETDEFAULT + __DBCONTINUE + __DBZAP + __FLEDIT + __RDDSETDEFAULT + __dbCopyStruct + __dbCopyXStruct + __dbCreate + __dbStructFilter + dbSkipper + CDOW + CMONTH + CTOD + DATE + DAY + DAYS + DOW + DTOC + DTOS + MONTH + YEAR + + GETENV + SET + SETMODE + SETTYPEAHEAD + VERSION + __SETCENTURY + __SetFunction + + break + errorsys + throw + errornew + + HB_SETKEYSAVE + HB_SetKeyCheck + HB_SetKeyGet + SETKEY + __QUIT + __WAIT + + file + frename + __dir + + col + maxcol + maxrow + row + hb_colorindex + + CURDIR + DIRCHANGE + DIRREMOVE + DISKSPACE + FCLOSE + FCREATE + FERASE + FERROR + FOPEN + FREAD + FREADSTR + FSEEK + FWRITE + HB_DISKSPACE + HB_FEOF + ISDISK + MAKEDIR + + ABS + EXP + INT + LOG + MAX + MIN + MOD + ROUND + SQRT + + HB_ISBYREF + PROCFILE + PROCLINE + PROCNAME + TYPE + VALTYPE + valtoprg + tone + + HB_LANGNAME + HB_LANGSELECT + ISAFFIRM + ISNEGATIVE + NATIONMSG + + pcount + HB_pvalue + + ALLTRIM + ASC + AT + CHR + HARDCR + HB_ANSITOOEM + HB_OEMTOANSI + HB_VALTOSTR + ISALPHA + ISDIGIT + ISLOWER + ISUPPER + LEFT + LEN + LOWER + LTRIM + MEMOTRAN + PADC + PADL + PADR + RAT + REPLICATE + RIGHT + RTRIM + SPACE + STR + STRTRAN + STRZERO + SUBSTR + TRANSFORM + TRIM + UPPER + VAL + + devoutpict + + elaptime + seconds + secs + time + + do + + ThreadStart + ThreadStop + ThreadSleep + ThreadKill + ThreadJoin + CreateMutex + DestroyMutex + MutexLock + MutexUnlock + Subscribe + SubscribeNow + Notify + NotifyAll + WaitForThreads + KillAllThreads + + InetInit + InetCleanup + InetCreate + InetDestroy + InetConnect + InetServer + InetAccept + InetSetTimeout + InetGetTimeout + InetClearTimeout + InetRecv + InetRecvAll + InetSend + InetSendAll + InetDGram + InetDGramRecv + InetDGramSend + InetAddress + InetPort + InetError + InetErrorDesc + InetGetHosts + InetConnectIP + + hb_regex + hb_regexmatch + hb_regexsplit + hb_regexcomp + hb_readini + hb_writeini + hb_random + hb_chechsum + hb_crypt + hb_decrypt + hb_hextonum + hb_numtohex + hb_exec + hb_execfromarray + + hb_class + hb_keyput + hb_osnewline + + + + + #include + #if + #ifdef + #ifndef + #endif + #else + #define + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/xml.xml b/kate/data/xml.xml new file mode 100644 index 000000000..22c284ae2 --- /dev/null +++ b/kate/data/xml.xml @@ -0,0 +1,147 @@ + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/xmldebug.xml b/kate/data/xmldebug.xml new file mode 100644 index 000000000..07b7612f5 --- /dev/null +++ b/kate/data/xmldebug.xml @@ -0,0 +1,593 @@ + + + + + + CDATA + ID + IDREF + IDREFS + ENTITY + ENTITIES + NMTOKEN + NMTOKENS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/xslt.xml b/kate/data/xslt.xml new file mode 100644 index 000000000..b0462c6f8 --- /dev/null +++ b/kate/data/xslt.xml @@ -0,0 +1,379 @@ + + + + +]> + + + + + + + xsl:value-of + xsl:output + xsl:decimal-format + xsl:apply-templates + xsl:param + xsl:transform + xsl:namespace-alias + xsl:comment + xsl:element + xsl:attribute + xsl:apply-imports + xsl:text + xsl:when + xsl:template + xsl:processing-instruction + xsl:include + xsl:copy-of + xsl:copy + xsl:with-param + xsl:stylesheet + xsl:for-each + xsl:choose + xsl:sort + xsl:otherwise + xsl:key + xsl:variable + xsl:number + xsl:message + xsl:fallback + xsl:strip-space + xsl:import + xsl:preserve-space + xsl:if + xsl:call-template + xsl:attribute-set + + + + xsl:perform-sort + xsl:import-schema + xsl:for-each-group + xsl:sequence + xsl:non-matching-substring + xsl:namespace + xsl:next-match + xsl:function + xsl:analyze-string + xsl:output-character + xsl:matching-substring + xsl:result-document + xsl:character-map + xsl:document + + + + format-number + position + lang + substring-before + substring + normalize-space + round + translate + starts-with + concat + local-name + key + count + document + system-property + current + boolean + number + contains + name + last + unparsed-entity-uri + sum + generate-id + function-available + element-available + false + substring-after + not + string-length + id + floor + ceiling + namespace-uri + true + string + text + + + + zero-or-one + replace + namespace-uri-for-prefix + current-grouping-key + seconds-from-duration + resolve-uri + node-kind + minutes-from-dateTime + implicit-timezone + exactly-one + current-time + current-dateTime + unordered + subtract-dates-yielding-dayTimeDuration + string-join + static-base-uri + months-from-duration + input + exists + default-collation + dateTime + current-group + current-date + collection + timezone-from-time + matches + local-name-from-QName + day-from-date + timezone-from-date + round-half-to-even + month-from-dateTime + month-from-date + hours-from-duration + escape-uri + distinct-values + avg + years-from-duration + unparsed-text + unparsed-entity-public-id + subtract-dateTimes-yielding-dayTimeDuration + subtract-dates-yielding-yearMonthDuration + string-to-codepoints + sequence-node-identical + hours-from-time + hours-from-dateTime + format-time + codepoints-to-string + trace + tokenize + subtract-dateTimes-yielding-yearMonthDuration + subsequence + seconds-from-dateTime + regex-group + one-or-more + node-name + namespace-uri-from-QName + min + idref + format-dateTime + format-date + days-from-duration + compare + base-uri + seconds-from-time + in-scope-prefixes + expanded-QName + adjust-date-to-timezone + year-from-date + resolve-QName + remove + QName + minutes-from-time + max + lower-case + index-of + doc + deep-equal + data + minutes-from-duration + adjust-dateTime-to-timezone + abs + timezone-from-dateTime + reverse + error + ends-with + day-from-dateTime + year-from-dateTime + upper-case + root + normalize-unicode + empty + insert-before + document-uri + adjust-time-to-timezone + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/yacas.xml b/kate/data/yacas.xml new file mode 100644 index 000000000..f7d8ef5e4 --- /dev/null +++ b/kate/data/yacas.xml @@ -0,0 +1,237 @@ + + + + + + And + ApplyPure + ArrayCreate + ArrayGet + ArraySet + ArraySize + Atom + Berlekamp + BitAnd + BitOr + BitXor + Bodied + CTokenizer + Check + Clear + CommonLispTokenizer + Concat + ConcatStrings + CurrentFile + CurrentLine + CustomEval + CustomEval'Expression + CustomEval'Locals + CustomEval'Result + CustomEval'Stop + DefLoad + DefLoadFunction + DefMacroRuleBase + DefMacroRuleBaseListed + DefaultDirectory + DefaultTokenizer + Delete + DestructiveDelete + DestructiveInsert + DestructiveReplace + DestructiveReverse + DllEnumerate + DllLoad + DllUnload + Equals + Eval + FastArcCos + FastArcSin + FastArcTan + FastAssoc + FastCos + FastExp + FastIsPrime + FastLog + FastPower + FastSin + FastTan + FindFile + FindFunction + FlatCopy + FromBase + FromFile + FromString + FullForm + GarbageCollect + GenericTypeName + GetExtraInfo + GetPrecision + GreaterThan + Head + Hold + HoldArg + If + Infix + Insert + IsAtom + IsBodied + IsBound + IsFunction + IsGeneric + IsInfix + IsInteger + IsList + IsNumber + IsPostfix + IsPrefix + IsString + LazyGlobal + LeftPrecedence + Length + LessThan + LispRead + LispReadListed + List + Listify + Load + Local + LocalSymbols + MacroClear + MacroLocal + MacroRule + MacroRuleBase + MacroRuleBaseListed + MacroRulePattern + MacroSet + MathAbs + MathAdd + MathAnd + MathArcCos + MathArcSin + MathArcTan + MathCeil + MathCos + MathDiv + MathDivide + MathExp + MathFac + MathFloor + MathGcd + MathGetExactBits + MathLibrary + MathLog + MathMod + MathMultiply + MathNot + MathNth + MathOr + MathPi + MathPower + MathSetExactBits + MathSin + MathSqrt + MathSubtract + MathTan + MaxEvalDepth + Not + OpLeftPrecedence + OpPrecedence + OpRightPrecedence + Or + PatchLoad + PatchString + PatternCreate + PatternMatches + Postfix + Precision + Prefix + PrettyPrinter + Prog + Read + ReadToken + Replace + Retract + RightAssociative + RightPrecedence + Rule + RuleBase + RuleBaseArgList + RuleBaseDefined + RuleBaseListed + RulePattern + Secure + Set + SetExtraInfo + SetStringMid + ShiftLeft + ShiftRight + String + StringMid + Subst + SystemCall + Tail + ToBase + ToFile + ToString + TraceRule + TraceStack + Type + UnFence + UnList + Use + Version + While + Write + WriteString + XmlExplodeTag + XmlTokenizer + ` + = + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/data/yacc.xml b/kate/data/yacc.xml new file mode 100644 index 000000000..db45ed42d --- /dev/null +++ b/kate/data/yacc.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kate/interfaces/.kateconfig b/kate/interfaces/.kateconfig new file mode 100644 index 000000000..5b0885abe --- /dev/null +++ b/kate/interfaces/.kateconfig @@ -0,0 +1 @@ +kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/interfaces/Makefile.am b/kate/interfaces/Makefile.am new file mode 100644 index 000000000..175dcf381 --- /dev/null +++ b/kate/interfaces/Makefile.am @@ -0,0 +1,12 @@ +METASOURCES = document.moc view.moc + +lib_LTLIBRARIES = libkatepartinterfaces.la + +libkatepartinterfaces_la_SOURCES = interfaces.cpp katecmd.cpp +libkatepartinterfaces_la_LIBADD = $(top_builddir)/interfaces/ktexteditor/libktexteditor.la +libkatepartinterfaces_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined + +kateinclude_HEADERS = document.h view.h +kateincludedir = $(includedir)/kate + +INCLUDES= -I$(top_srcdir)/interfaces -I$(top_srcdir)/kparts -I$(top_srcdir) $(all_includes) diff --git a/kate/interfaces/document.h b/kate/interfaces/document.h new file mode 100644 index 000000000..6e7cb9a56 --- /dev/null +++ b/kate/interfaces/document.h @@ -0,0 +1,407 @@ +/* This file is part of the KDE libraries + Copyright (C) 2001 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _KATE_DOCUMENT_INCLUDE_ +#define _KATE_DOCUMENT_INCLUDE_ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class KCompletion; + +/** + * Kate namespace + * All classes in this namespace must stay BC + * during one major release series (e.g. 3.x, 4.x, ...) + */ +namespace Kate +{ + +class View; + +class KATEPARTINTERFACES_EXPORT Cursor : public KTextEditor::Cursor +{ + public: + Cursor () { ; }; + virtual ~Cursor () { ; }; +}; + +class KATEPARTINTERFACES_EXPORT ConfigPage : public KTextEditor::ConfigPage +{ + Q_OBJECT + + public: + ConfigPage ( QWidget *parent=0, const char *name=0 ) : KTextEditor::ConfigPage (parent, name) { ; }; + virtual ~ConfigPage () { ; }; + + public slots: + virtual void apply () { ; }; + virtual void reload () { ; }; + virtual void reset () {}; + virtual void defaults () {}; + + protected slots: + void slotChanged(); +}; + +class KATEPARTINTERFACES_EXPORT ActionMenu : public KActionMenu +{ + Q_OBJECT + + public: + ActionMenu ( const QString& text, QObject* parent = 0, const char* name = 0 ) + : KActionMenu(text, parent, name) { ; }; + virtual ~ActionMenu () { ; }; + + public: + virtual void updateMenu (class Document *) = 0; +}; + +/** + * Kate Commands + */ +class KATEPARTINTERFACES_EXPORT Command +{ + public: + Command () {}; + virtual ~Command () {}; + + public: + /** + * Pure text start part of the commands which can be handled by this object + * which means i.e. for s/sdl/sdf/g => s or for char:1212 => char + */ + virtual QStringList cmds () = 0; + + /** + * Execute this command for the given view and cmd string, return a bool + * about success, msg for status + */ + virtual bool exec (View *view, const QString &cmd, QString &msg) = 0; + + /** + * Shows help for the given view and cmd string, return a bool + * about success, msg for status + */ + virtual bool help (View *view, const QString &cmd, QString &msg) = 0; +}; + +/** + * Extension to the Command interface, allowing to interact with commands + * during typing. This allows for completion and for example the isearch + * plugin. If you develop a command that wants to complete or process text + * as thu user types the arguments, or that has flags, you can have + * your command inherit this class. + */ +class CommandExtension +{ + public: + CommandExtension() {;} + virtual ~CommandExtension() {;} + + /** + * Fill in a list of flags to complete from. Each flag is a single letter, + * any following text in the string is taken to be a description of the + * flag's meaning, and showed to the user as a hint. + * Implement this method if your command has flags. + * + * This method is called each time the flag string in the typed command + * is changed, so that the available flags can be adjusted. When completions + * are displayed, existing flags are left out. + * + */ //### this is yet to be tried + virtual void flagCompletions( QStringList& /*list*/ ) {;} + + /** + * @return a KCompletion object that will substitute the command line default + * one while typing the first argument to the command. The text will be + * added to the command seperated by one space character. + * + * Implement this method if your command can provide a completion object. + * + * @param cmdname The command name associated with this request. + */ + virtual KCompletion *completionObject( const QString & cmdname, Kate::View * /*view*/ ) { Q_UNUSED(cmdname); return 0L; } + + /** + * @return whether this command wants to process text interactively given the @p cmdname. + * If true, the command's processText() method is called when the + * text in the command line is changed. + * + * Reimplement this to return true, if your commands wants to process the + * text as typed. + * + * @param cmdname the command name associated with this query. + */ + virtual bool wantsToProcessText( const QString &cmdname ) { Q_UNUSED(cmdname); return false; } + + /** + * This is called by the commandline each time the argument text for the + * command changes, if wantsToProcessText() returns true. + * @param view The current view + * @param text The current command text typed by the user. + */ // ### yet to be tested. The obvious candidate is isearch. + virtual void processText( Kate::View *view, const QString &text ) { Q_UNUSED(view); Q_UNUSED(text); } +}; + +/** This interface provides access to the Kate Document class. +*/ +class KATEPARTINTERFACES_EXPORT Document : public KTextEditor::Document, public KTextEditor::EditInterface, + public KTextEditor::UndoInterface, public KTextEditor::CursorInterface, + public KTextEditor::SelectionInterface, public KTextEditor::SearchInterface, + public KTextEditor::HighlightingInterface, public KTextEditor::BlockSelectionInterface, + public KTextEditor::ConfigInterface, public KTextEditor::MarkInterface, + public KTextEditor::PrintInterface, public KTextEditor::WordWrapInterface, + public KTextEditor::MarkInterfaceExtension, + public KTextEditor::SelectionInterfaceExt +{ + Q_OBJECT + + public: + Document (); + Document ( QObject* parent, const char* name ); + virtual ~Document (); + + /** + * Commands handling + */ + public: + static bool registerCommand (Command *cmd); + static bool unregisterCommand (Command *cmd); + static Command *queryCommand (const QString &cmd); + + public: + /** + * deprecated for KDE 4.0, just does reloadFile, which will ask + * the normal "do you want it really" questions + * @deprecated + */ + virtual void isModOnHD(bool =false) { ; }; + + /** + * Returns the document name. + */ + virtual QString docName () { return 0L; }; + + /** + * Sets the document name. + * deprecated for KDE 4.0, is done internally, calling it won't hurt + * but changes nothing beside triggers signal + * @deprecated + */ + virtual void setDocName (QString ) { ; }; + + virtual ActionMenu *hlActionMenu (const QString& , QObject* =0, const char* = 0) = 0; + virtual ActionMenu *exportActionMenu (const QString& , QObject* =0, const char* = 0) = 0; + + public slots: + // clear buffer/filename - update the views + virtual void flush () { ; }; + + /** + * Reloads the current document from disk if possible + */ + virtual void reloadFile() = 0; + + /** + * Spellchecking + */ + virtual void spellcheck() {}; + + virtual void exportAs(const QString &) = 0; + + virtual void applyWordWrap () = 0; + + + public: + virtual void setWordWrap (bool ) = 0; + virtual bool wordWrap () = 0; + + virtual void setWordWrapAt (unsigned int) = 0; + virtual uint wordWrapAt () = 0; + + + virtual void setEncoding (const QString &e) = 0; + virtual QString encoding() const = 0; + + /** @deprecated */ + // FIXME: Remove when BIC allowed. + public: + /** @deprecated */ + virtual ConfigPage *colorConfigPage (QWidget *) = 0; + /** @deprecated */ + virtual ConfigPage *fontConfigPage (QWidget *) = 0; + /** @deprecated */ + virtual ConfigPage *indentConfigPage (QWidget *) = 0; + /** @deprecated */ + virtual ConfigPage *selectConfigPage (QWidget *) = 0; + /** @deprecated */ + virtual ConfigPage *editConfigPage (QWidget *) = 0; + /** @deprecated */ + virtual ConfigPage *keysConfigPage (QWidget *) = 0; + /** @deprecated */ + virtual ConfigPage *kSpellConfigPage (QWidget *) { return 0L; } + /** @deprecated */ + virtual ConfigPage *hlConfigPage (QWidget *) = 0; + + public: + virtual uint configFlags () = 0; + virtual void setConfigFlags (uint flags) = 0; + + // Flags for katedocument config ! + enum ConfigFlags + { + cfAutoIndent= 0x1, + cfBackspaceIndents= 0x2, + cfWordWrap= 0x4, + cfReplaceTabs= 0x8, + cfRemoveSpaces = 0x10, + cfWrapCursor= 0x20, + cfAutoBrackets= 0x40, + cfPersistent= 0x80, + cfKeepSelection= 0x100, + cfDelOnInput= 0x400, + cfXorSelect= 0x800, + cfOvr= 0x1000, + cfMark= 0x2000, + cfKeepIndentProfile= 0x8000, + cfKeepExtraSpaces= 0x10000, + cfTabIndents= 0x80000, + cfShowTabs= 0x200000, + cfSpaceIndent= 0x400000, + cfSmartHome = 0x800000 + }; + + signals: + /** + * Indicate this file is modified on disk + * @param doc the Kate::Document object that represents the file on disk + * @param isModified indicates the file was modified rather than created or deleted + * @param reason the reason we are emitting the signal. + * @li 0 - nothing + * @li 1 - dirty + * @li 2 - created + * @li 3 - deleted + */ + void modifiedOnDisc (Kate::Document *doc, bool isModified, unsigned char reason); + + /* + * there static methodes are usefull to turn on/off the dialogs + * kate part shows up on open file errors + file changed warnings + * open file errors default on, file changed warnings default off, better + * for other apps beside kate app using the part + */ + public: + // default true + static void setOpenErrorDialogsActivated (bool on); + + // default false + static void setFileChangedDialogsActivated (bool on); + + static const QString &defaultEncoding (); + + protected: + static bool s_openErrorDialogsActivated; + static bool s_fileChangedDialogsActivated; + + static QString s_defaultEncoding; +}; + +/** + * Extensions to the Document Interface + * @since 3.3 + */ +class KATEPARTINTERFACES_EXPORT DocumentExt + : public KTextEditor::DocumentInfoInterface, + public KTextEditor::VariableInterface +{ + public: + DocumentExt (); + virtual ~DocumentExt (); + + public: + /** + * Reasons why a document is modified on disk. + */ + enum ModifiedOnDiskReason { + Unmodified = 0, ///< Not modified + Modified = 1, ///< The file was modified by another program + Created = 2, ///< The file was created by another program + Deleted = 3 ///< The file was deleted + }; + + public: + /** + * For client apps that want to deal with files modified on disk, it is + * nessecary to reset this property. + * @p reason is a ModifiedOnDiskReason. + */ + virtual void setModifiedOnDisk( int reason ) = 0; + + /** + * These stuff is implemented as slots in the real document + */ + public: + /** + * Ask the user what to do, if the file is modified on disk. + * The @p v argument is used to avoid asking again, when the + * editor regains focus after the dialog is hidden. + */ + virtual void slotModifiedOnDisk( View *v=0 ) = 0; +}; + +/** + * Check if given document is a Kate::Document + * @param doc KTextEditor document + * @return 0 if no success, else the Kate::Document + */ +KATEPARTINTERFACES_EXPORT Document *document (KTextEditor::Document *doc); + +/** + * Check if given document is a Kate::DocumentExt + * @param doc KTextEditor document + * @return 0 if no success, else the Kate::DocumentExt + */ +KATEPARTINTERFACES_EXPORT DocumentExt *documentExt (KTextEditor::Document *doc); + +/** + * Creates a new Kate::Document object + */ +KATEPARTINTERFACES_EXPORT Document *createDocument ( QObject *parent = 0, const char *name = 0 ); + +} + +#endif diff --git a/kate/interfaces/interfaces.cpp b/kate/interfaces/interfaces.cpp new file mode 100644 index 000000000..42bd35b7e --- /dev/null +++ b/kate/interfaces/interfaces.cpp @@ -0,0 +1,127 @@ +/* This file is part of the KDE libraries + Copyright (C) 2001 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "document.h" +#include "document.moc" + +#include "view.h" +#include "view.moc" + +#include "katecmd.h" + +namespace Kate +{ + +bool Document::s_openErrorDialogsActivated = true; +bool Document::s_fileChangedDialogsActivated = false; +QString Document::s_defaultEncoding; + +Document::Document (QObject* parent, const char* name) + : KTextEditor::Document (parent, name) +{ +} + +Document::Document () : KTextEditor::Document (0L, "Kate::Document") +{ +} + +Document::~Document () +{ +} + +void Document::setOpenErrorDialogsActivated (bool on) +{ + s_openErrorDialogsActivated = on; +} + +void Document::setFileChangedDialogsActivated (bool on) +{ + s_fileChangedDialogsActivated = on; +} + +const QString &Document::defaultEncoding () +{ + return s_defaultEncoding; +} + +bool Document::registerCommand (Command *cmd) +{ + return KateCmd::self()->registerCommand (cmd); +} + +bool Document::unregisterCommand (Command *cmd) +{ + return KateCmd::self()->unregisterCommand (cmd); +} + +Command *Document::queryCommand (const QString &cmd) +{ + return KateCmd::self()->queryCommand (cmd); +} + +View::View ( KTextEditor::Document *doc, QWidget *parent, const char *name ) : KTextEditor::View (doc, parent, name) +{ +} + +View::~View () +{ +} + +void ConfigPage::slotChanged() +{ + emit changed(); +} + +DocumentExt::DocumentExt () +{ +} + +DocumentExt::~DocumentExt () +{ +} + +Document *document (KTextEditor::Document *doc) +{ + if (!doc) + return 0; + + return static_cast(doc->qt_cast("Kate::Document")); +} + +DocumentExt *documentExt (KTextEditor::Document *doc) +{ + if (!doc) + return 0; + + return static_cast(doc->qt_cast("Kate::DocumentExt")); +} + +Document *createDocument ( QObject *parent, const char *name ) +{ + return (Document* ) KTextEditor::createDocument ("libkatepart", parent, name); +} + +View *view (KTextEditor::View *view) +{ + if (!view) + return 0; + + return static_cast(view->qt_cast("Kate::View")); +} + +} diff --git a/kate/interfaces/katecmd.cpp b/kate/interfaces/katecmd.cpp new file mode 100644 index 000000000..e6a981dd5 --- /dev/null +++ b/kate/interfaces/katecmd.cpp @@ -0,0 +1,223 @@ +/* This file is part of the KDE libraries + Copyright (C) 2001, 2003 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "katecmd.h" + +#include +#include + +//BEGIN KateCmd +#define CMD_HIST_LENGTH 256 + +KateCmd *KateCmd::s_self = 0; + +KateCmd::KateCmd () +{ +} + +KateCmd::~KateCmd () +{ +} + +bool KateCmd::registerCommand (Kate::Command *cmd) +{ + QStringList l = cmd->cmds (); + + for (uint z=0; z it(m_dict); + for( ; it.current(); ++it ) + if (it.current()==cmd) l< sdCmd; + +KateCmd *KateCmd::self () +{ + if (!s_self) + sdCmd.setObject(s_self, new KateCmd ()); + + return s_self; +} + +void KateCmd::appendHistory( const QString &cmd ) +{ + if ( !m_history.isEmpty() && m_history.last() == cmd ) + return; + + if ( m_history.count() == CMD_HIST_LENGTH ) + m_history.remove( m_history.first() ); + + m_history.append( cmd ); +} + +const QString KateCmd::fromHistory( uint index ) const +{ + if ( index > m_history.count() - 1 ) + return QString(); + return m_history[ index ]; +} +//END KateCmd + +//BEGIN KateCmdShellCompletion +/* + A lot of the code in the below class is copied from + kdelibs/kio/kio/kshellcompletion.cpp + Copyright (C) 2000 David Smith + Copyright (C) 2004 Anders Lund +*/ +KateCmdShellCompletion::KateCmdShellCompletion() + : KCompletion() +{ + m_word_break_char = ' '; + m_quote_char1 = '\"'; + m_quote_char2 = '\''; + m_escape_char = '\\'; +} + +QString KateCmdShellCompletion::makeCompletion( const QString &text ) +{ + // Split text at the last unquoted space + // + splitText(text, m_text_start, m_text_compl); + + // Make completion on the last part of text + // + return KCompletion::makeCompletion( m_text_compl ); +} + +void KateCmdShellCompletion::postProcessMatch( QString *match ) const +{ + if ( match->isNull() ) + return; + + match->prepend( m_text_start ); +} + +void KateCmdShellCompletion::postProcessMatches( QStringList *matches ) const +{ + for ( QStringList::Iterator it = matches->begin(); + it != matches->end(); it++ ) + if ( !(*it).isNull() ) + (*it).prepend( m_text_start ); +} + +void KateCmdShellCompletion::postProcessMatches( KCompletionMatches *matches ) const +{ + for ( KCompletionMatches::Iterator it = matches->begin(); + it != matches->end(); it++ ) + if ( !(*it).value().isNull() ) + (*it).value().prepend( m_text_start ); +} + +void KateCmdShellCompletion::splitText(const QString &text, QString &text_start, + QString &text_compl) const +{ + bool in_quote = false; + bool escaped = false; + QChar p_last_quote_char; + int last_unquoted_space = -1; + int end_space_len = 0; + + for (uint pos = 0; pos < text.length(); pos++) { + + end_space_len = 0; + + if ( escaped ) { + escaped = false; + } + else if ( in_quote && text[pos] == p_last_quote_char ) { + in_quote = false; + } + else if ( !in_quote && text[pos] == m_quote_char1 ) { + p_last_quote_char = m_quote_char1; + in_quote = true; + } + else if ( !in_quote && text[pos] == m_quote_char2 ) { + p_last_quote_char = m_quote_char2; + in_quote = true; + } + else if ( text[pos] == m_escape_char ) { + escaped = true; + } + else if ( !in_quote && text[pos] == m_word_break_char ) { + + end_space_len = 1; + + while ( pos+1 < text.length() && text[pos+1] == m_word_break_char ) { + end_space_len++; + pos++; + } + + if ( pos+1 == text.length() ) + break; + + last_unquoted_space = pos; + } + } + + text_start = text.left( last_unquoted_space + 1 ); + + // the last part without trailing blanks + text_compl = text.mid( last_unquoted_space + 1 ); +} + +//END KateCmdShellCompletion + + diff --git a/kate/interfaces/katecmd.h b/kate/interfaces/katecmd.h new file mode 100644 index 000000000..8af9e1f6c --- /dev/null +++ b/kate/interfaces/katecmd.h @@ -0,0 +1,99 @@ +/* This file is part of the KDE libraries + Copyright (C) 2001, 2003 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _KATE_CMD_H +#define _KATE_CMD_H + +#include "document.h" + +#include + +#include +#include + +class KATEPARTINTERFACES_EXPORT KateCmd +{ + private: + KateCmd (); + + public: + ~KateCmd (); + + static KateCmd *self (); + + bool registerCommand (Kate::Command *cmd); + bool unregisterCommand (Kate::Command *cmd); + Kate::Command *queryCommand (const QString &cmd); + + QStringList cmds (); + void appendHistory( const QString &cmd ); + const QString fromHistory( uint i ) const; + uint historyLength() const { return m_history.count(); } + + private: + static KateCmd *s_self; + QDict m_dict; + QStringList m_cmds; + QStringList m_history; +}; + +/** + * A KCompletion object that completes last ?unquoted? word in the string + * passed. Dont mistake "shell" for anything related to quoting, this + * simply mimics shell tab completion by completing the last word in the + * provided text. + */ +class KATEPARTINTERFACES_EXPORT KateCmdShellCompletion : public KCompletion +{ + public: + KateCmdShellCompletion(); + + /** + * Finds completions to the given text. + * The first match is returned and emitted in the signal match(). + * @param text the text to complete + * @return the first match, or QString::null if not found + */ + QString makeCompletion(const QString &text); + + protected: + // Called by KCompletion + void postProcessMatch( QString *match ) const; + void postProcessMatches( QStringList *matches ) const; + void postProcessMatches( KCompletionMatches *matches ) const; + + private: + /** + * Split text at the last unquoted space + * + * @param text_start will be set to the text at the left, including the space + * @param text_compl Will be set to the text at the right. This is the text to complete. + */ + void splitText( const QString &text, QString &text_start, QString &text_compl ) const; + + QChar m_word_break_char; + QChar m_quote_char1; + QChar m_quote_char2; + QChar m_escape_char; + + QString m_text_start; + QString m_text_compl; + +}; + +#endif diff --git a/kate/interfaces/view.h b/kate/interfaces/view.h new file mode 100644 index 000000000..98290039e --- /dev/null +++ b/kate/interfaces/view.h @@ -0,0 +1,303 @@ +/* This file is part of the KDE libraries + Copyright (C) 2001 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef _KATE_VIEW_INCLUDE_ +#define _KATE_VIEW_INCLUDE_ + +#include +#include +#include +#include +#include +#include +#include +#include + +class KConfig; + +namespace Kate +{ + +class Document; + +/** + The Kate::View text editor interface. + @author Cullmann Christoph, modified by rokrau (6/21/01) +*/ +class KATEPARTINTERFACES_EXPORT View : public KTextEditor::View, public KTextEditor::ClipboardInterface, + public KTextEditor::PopupMenuInterface, public KTextEditor::ViewCursorInterface, + public KTextEditor::CodeCompletionInterface, public KTextEditor::DynWordWrapInterface +{ + Q_OBJECT + + public: + /** + Return values for "save" related commands. + */ + enum saveResult { SAVE_OK, SAVE_CANCEL, SAVE_RETRY, SAVE_ERROR }; + /** + Constructor (should much rather take a reference to the document). + */ + View ( KTextEditor::Document *, QWidget *, const char *name = 0 ); + /** + Destructor, you need a destructor if Scott Meyers says so. + */ + virtual ~View (); + /** + Set editor mode + */ + virtual bool isOverwriteMode() const { return false; } + /** + Get editor mode + */ + virtual void setOverwriteMode( bool ) { } + /** + Gets the text line where the cursor is on + */ + virtual QString currentTextLine() { return 0L; } + /** + Gets the word where the cursor is on + */ + virtual QString currentWord() { return 0L; } + /** + Gets the word at position x, y. Can be used to find + the word under the mouse cursor + */ + virtual QString word(int , int ) { return 0L; } + /** + Insert text at the current cursor position. + @param mark is unused. + */ + virtual void insertText(const QString &mark ) { Q_UNUSED(mark); } + /** + Works exactly like closeURL() of KParts::ReadWritePart + */ + virtual bool canDiscard() { return false; } + + public: + virtual int tabWidth() = 0; + virtual void setTabWidth(int) = 0; + virtual void setEncoding (QString e) = 0; + + /** + Returns true if this editor is the only owner of its document + */ + virtual bool isLastView() = 0; + + public slots: + /** + Flushes the document of the text widget. The user is given + a chance to save the current document if the current document has + been modified. + */ + virtual void flush () { ; }; + /** + Saves the file under the current file name. If the current file + name is Untitled, as it is after a call to newFile(), this routine will + call saveAs(). + */ + virtual saveResult save() { return SAVE_CANCEL; }; + /** + Allows the user to save the file under a new name. + */ + virtual saveResult saveAs() { return SAVE_CANCEL; }; + /** + Moves the current line or the selection one position to the right. + */ + virtual void indent() { ; }; + /** + Moves the current line or the selection one position to the left. + */ + virtual void unIndent() { ; }; + /** + Optimizes the selected indentation, replacing tabs and spaces as needed. + */ + virtual void cleanIndent() { ; }; + /** + Comments out current line. + */ + virtual void comment() { ; }; + /** + Removes comment signs in the current line. + */ + virtual void uncomment() { ; }; + /** + Some simply key commands. + */ + virtual void keyReturn () { ; }; + virtual void keyDelete () { ; }; + virtual void backspace () { ; }; + virtual void killLine () { ; }; + /** + Move cursor in the view + */ + virtual void cursorLeft () { ; }; + virtual void shiftCursorLeft () { ; }; + virtual void cursorRight () { ; }; + virtual void shiftCursorRight () { ; }; + virtual void wordLeft () { ; }; + virtual void shiftWordLeft () { ; }; + virtual void wordRight () { ; }; + virtual void shiftWordRight () { ; }; + virtual void home () { ; }; + virtual void shiftHome () { ; }; + virtual void end () { ; }; + virtual void shiftEnd () { ; }; + virtual void up () { ; }; + virtual void shiftUp () { ; }; + virtual void down () { ; }; + virtual void shiftDown () { ; }; + virtual void scrollUp () { ; }; + virtual void scrollDown () { ; }; + virtual void topOfView () { ; }; + virtual void bottomOfView () { ; }; + virtual void pageUp () { ; }; + virtual void shiftPageUp () { ; }; + virtual void pageDown () { ; }; + virtual void shiftPageDown () { ; }; + virtual void top () { ; }; + virtual void shiftTop () { ; }; + virtual void bottom () { ; }; + virtual void shiftBottom () { ; }; + /** + Presents a search dialog to the user. + */ + virtual void find() { ; }; + /** + Presents a replace dialog to the user. + */ + virtual void replace() { ; }; + /** + Presents a "Goto Line" dialog to the user. + */ + virtual void gotoLine() { ; }; + + public: + /** + Reads session config out of the KConfig object. This also includes + the actual cursor position and the bookmarks. + */ + virtual void readSessionConfig(KConfig *) { ; }; + /** + Writes session config into the KConfig object. + */ + virtual void writeSessionConfig(KConfig *) { ; }; + + public slots: + /** + Get the end of line mode (Unix, Macintosh or Dos). + */ + virtual int getEol() { return 0L; } + /** + Set the end of line mode (Unix, Macintosh or Dos). + */ + virtual void setEol(int) { } + /** + Set focus to the current window. + */ + // Should remove this, it's redundant. + virtual void setFocus () { QWidget::setFocus(); } + /** + Searches for the last searched text forward from cursor position. + @param forward determines the search direction. + */ + virtual void findAgain(bool forward ) { Q_UNUSED(forward); } + /** + Searches for the last searched text forward from cursor position. + Searches forward from current cursor position. + */ + virtual void findAgain () { }; + /** + Searches for the last searched text forward from cursor position. + Searches backward from current cursor position. + */ + virtual void findPrev () { } + /** + Presents an edit command popup window, where the user can + apply a shell command to the contents of the current window. + */ + virtual void slotEditCommand () { } + + /** + Sets icon border on or off depending on + @param enable the flag + */ + virtual void setIconBorder (bool enable ) { Q_UNUSED(enable); } + /** + Toggles icon border. + */ + virtual void toggleIconBorder () { } + /** + Sets display of line numbers on/off depending on @p enable + @param enable the flag + */ + virtual void setLineNumbersOn (bool enable) { Q_UNUSED(enable); } + /** + Toggles display of lineNumbers + */ + virtual void toggleLineNumbersOn () {} + + public: + /** + Returns whether iconborder is visible. + */ + virtual bool iconBorder() { return false; } + /** + @return Wheather line numbers display is on + */ + virtual bool lineNumbersOn() { return false; } + /** + Returns a pointer to the document of the view. + */ + virtual Document *getDoc () { return 0L; } + + public slots: + /** + Increase font size. + */ + virtual void slotIncFontSizes () { } + /** + Decrease font size. + */ + virtual void slotDecFontSizes () { } + + virtual void gotoMark (KTextEditor::Mark *mark) = 0; + + /** + * @deprecated No longer does anything. Use KTextEditor + * equivalents + */ + // TODO: Remove when BIC is allowed + virtual void toggleBookmark () {} + + virtual void gotoLineNumber( int ) = 0; + + signals: + void gotFocus (View *); +// void newStatus(); // Kate app connects to this signal, should be in the interface + + public: + virtual void setActive (bool b) = 0; + virtual bool isActive () = 0; +}; + +KATEPARTINTERFACES_EXPORT View *view (KTextEditor::View *view); + +} + +#endif diff --git a/kate/part/.kateconfig b/kate/part/.kateconfig new file mode 100644 index 000000000..5b0885abe --- /dev/null +++ b/kate/part/.kateconfig @@ -0,0 +1 @@ +kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/Makefile.am b/kate/part/Makefile.am new file mode 100644 index 000000000..4a182452e --- /dev/null +++ b/kate/part/Makefile.am @@ -0,0 +1,44 @@ +kde_module_LTLIBRARIES = libkatepart.la + +noinst_LTLIBRARIES = libkate.la + +libkate_la_SOURCES = katesearch.cpp katebuffer.cpp katecmds.cpp \ + kateundo.cpp katecursor.cpp katedialogs.cpp katedocument.cpp \ + katefactory.cpp katehighlight.cpp katesyntaxdocument.cpp \ + katetextline.cpp kateview.cpp kateconfig.cpp kateviewhelpers.cpp \ + katecodecompletion.cpp katedocumenthelpers.cpp \ + katecodefoldinghelpers.cpp kateviewinternal.cpp katebookmarks.cpp \ + kateprinter.cpp katefont.cpp katelinerange.cpp katesupercursor.cpp \ + katearbitraryhighlight.cpp katerenderer.cpp kateattribute.cpp \ + kateautoindent.cpp katefiletype.cpp kateschema.cpp katedocument.skel \ + katetemplatehandler.cpp katejscript.cpp katespell.cpp kateindentscriptabstracts.cpp \ + kateluaindentscript.cpp + +libkatepart_la_SOURCES = dummy.cpp + +libkatepart_la_LIBADD = libkate.la ../interfaces/libkatepartinterfaces.la $(top_builddir)/kdeprint/libkdeprint.la $(top_builddir)/kutils/libkutils.la $(top_builddir)/kjs/libkjs.la $(LUA_LIBS) + +libkatepart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) + +INCLUDES= -I../interfaces -I$(top_srcdir) -I$(top_srcdir)/kdeprint -I$(top_srcdir)/interfaces -I$(top_srcdir)/interfaces/kregexpeditor -I$(top_srcdir)/kdefx -I$(top_srcdir)/kutils -I$(top_builddir)/kjs $(LUA_INCLUDES) $(all_includes) + +METASOURCES = AUTO + +LUT_FILES = katejscript.lut.h + +CREATE_HASH_TABLE = $(top_srcdir)/kjs/create_hash_table + +dummy.cpp: $(srcdir)/Makefile.am + touch $@ + +katejscript.lut.h : $(srcdir)/katejscript.cpp $(CREATE_HASH_TABLE) + $(PERL) $(CREATE_HASH_TABLE) $(srcdir)/katejscript.cpp > $@ +katejscript.lo: katejscript.lut.h + +CLEANFILES = $(LUT_FILES) + +## test program +TESTS = testkateregression +check_PROGRAMS = testkateregression +testkateregression_SOURCES = test_regression.cpp +testkateregression_LDADD = $(libkatepart_la_LIBADD) diff --git a/kate/part/configure.in.in b/kate/part/configure.in.in new file mode 100644 index 000000000..faf0717e9 --- /dev/null +++ b/kate/part/configure.in.in @@ -0,0 +1,89 @@ +AC_DEFUN([AC_PATH_LUA], [ + +dnl Based on the lua check used by yzis-M3 + + HAVE_LUA="" + + AC_ARG_WITH([lua], + AC_HELP_STRING([--without-lua], [Build without Lua libraries (default: check)])) + + AC_ARG_WITH(lua-dir, + AC_HELP_STRING([--with-lua-dir=DIR],[where the root of Lua 5.x is installed]), + [ + LUA="$withval" + LUA_INCLUDES=-I"$withval"/include + LUA_LIBS="-L$withval/lib" ]) + + AC_ARG_WITH(lua-includes, + AC_HELP_STRING([--with-lua-includes=DIR],[where the Lua includes are]), + [ LUA_INCLUDES="-I$withval" ]) + + AC_ARG_WITH(lua-libraries, + AC_HELP_STRING([--with-lua-libraries=DIR],[where the Lua library is installed]), + [ + LUA_LIBS="-L$withval" ]) + + + if test "x$with_lua" = "xno"; then + AC_MSG_RESULT([Not using Lua]) + else + if ! test "x$LUA" = "x"; then + AC_MSG_RESULT(using Lua from $LUA) + fi + if ! test "x$LUA_LIBS" = "x"; then + AC_MSG_RESULT(using Lua libraries in $LUA_LIBS) + fi + if ! test "x$LUA_INCLUDES" = "x"; then + AC_MSG_RESULT(using Lua includes in $LUA_INCLUDES) + fi + + dnl checking some headers first + ac_save_CFLAGS="$CFLAGS" + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_LDFLAGS="$LDFLAGS" + CFLAGS="$LUA_INCLUDES $CFLAGS" + CPPFLAGS="$LUA_INCLUDES $CPPFLAGS" + LDFLAGS="$LUA_LIBS $LDFLAGS" + + LUAH_FOUND="" + AC_CHECK_HEADER(lua.h,LUAH_FOUND="true", + [ AC_MSG_RESULT([lua.h was not found or was not usable, Lua 5.0 headers are required !]) ] + ) + LUALIBH_FOUND="" + AC_CHECK_HEADER(lualib.h,LUALIBH_FOUND="true", + [ AC_MSG_RESULT([lualib.h was not found or was not usable, Lua 5.0 headers are required !]) ] + ) + + + dnl find the libs name + if test -z "$LUALIBH_FOUND" -o -z "$LUAH_FOUND"; then + LUA_LIBS="" + else + AC_CHECK_LIB(lua50,lua_version, LUA_LIBS="$LUA_LIBS -llua50 -llualib50", + AC_CHECK_LIB(lua,lua_version, LUA_LIBS="$LUA_LIBS -llua -llualib", + [LUA_LIBS="" + AC_MSG_RESULT([Lua 5.0 libraries were not found !]) ] + ) + ) + fi + CFLAGS="$ac_save_CFLAGS" + CPPFLAGS="$ac_save_CPPFLAGS" + LDFLAGS="$ac_save_LDFLAGS" + + + if test -z "$LUA_LIBS"; then + LUA="" + LUA_INCLUDES="" + LUA_LIBS="" + else + AC_DEFINE_UNQUOTED(HAVE_LUA, 1, [Define if you have LUA > 5.0]) + HAVE_LUA="yes" + fi + AC_SUBST(LUA) + AC_SUBST(LUA_INCLUDES) + AC_SUBST(LUA_LIBS) + fi + +]) + +AC_PATH_LUA diff --git a/kate/part/katearbitraryhighlight.cpp b/kate/part/katearbitraryhighlight.cpp new file mode 100644 index 000000000..2ecbececc --- /dev/null +++ b/kate/part/katearbitraryhighlight.cpp @@ -0,0 +1,162 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Hamish Rodda + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "katearbitraryhighlight.h" +#include "katearbitraryhighlight.moc" + +#include "katesupercursor.h" +#include "katedocument.h" + +#include + +#include + +KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateSuperCursor* start, +KateSuperCursor* end, QObject* parent, const char* name) : +KateSuperRange(start, end, parent, name) { +} + +KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent, const char* name) + : KateSuperRange(doc, range, parent, name) +{ +} + +KateArbitraryHighlightRange::KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent, const char* name) + : KateSuperRange(doc, start, end, parent, name) +{ +} + +KateArbitraryHighlightRange::~KateArbitraryHighlightRange() +{ +} + +KateArbitraryHighlight::KateArbitraryHighlight(KateDocument* parent, const char* name) + : QObject(parent, name) +{ +} + +KateAttribute KateArbitraryHighlightRange::merge(QPtrList ranges) +{ + ranges.sort(); + + KateAttribute ret; + + if (ranges.first() && ranges.current()->inherits("KateArbitraryHighlightRange")) + ret = *(static_cast(ranges.current())); + + KateSuperRange* r; + while ((r = ranges.next())) { + if (r->inherits("KateArbitraryHighlightRange")) { + KateArbitraryHighlightRange* hl = static_cast(r); + ret += *hl; + } + } + + return ret; +} + +void KateArbitraryHighlight::addHighlightToDocument(KateSuperRangeList* list) +{ + m_docHLs.append(list); + connect(list, SIGNAL(rangeEliminated(KateSuperRange*)), SLOT(slotRangeEliminated(KateSuperRange*))); + connect(list, SIGNAL(destroyed(QObject*)),SLOT(slotRangeListDeleted(QObject*))); +} + +void KateArbitraryHighlight::addHighlightToView(KateSuperRangeList* list, KateView* view) +{ + if (!m_viewHLs[view]) + m_viewHLs.insert(view, new QPtrList()); + + m_viewHLs[view]->append(list); + + connect(list, SIGNAL(rangeEliminated(KateSuperRange*)), SLOT(slotTagRange(KateSuperRange*))); + connect(list, SIGNAL(tagRange(KateSuperRange*)), SLOT(slotTagRange(KateSuperRange*))); + connect(list, SIGNAL(destroyed(QObject*)),SLOT(slotRangeListDeleted(QObject*))); +} + +void KateArbitraryHighlight::slotRangeListDeleted(QObject* obj) { + int id=m_docHLs.findRef(static_cast(obj)); + if (id>=0) m_docHLs.take(id); + + for (QMap* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) + for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next()) + if (l==obj) { + l->take(); + break; //should we check if one list is stored more than once for a view ?? I don't think adding the same list 2 or more times is sane, but who knows (jowenn) + } +} + +KateSuperRangeList& KateArbitraryHighlight::rangesIncluding(uint line, KateView* view) +{ + // OPTIMISE make return value persistent + + static KateSuperRangeList s_return(false); + + Q_ASSERT(!s_return.autoDelete()); + s_return.clear(); + + //--- TEMPORARY OPTIMISATION: return the actual range when there are none or one. --- + if (m_docHLs.count() + m_viewHLs.count() == 0) + return s_return; + else if (m_docHLs.count() + m_viewHLs.count() == 1) + if (m_docHLs.count()) + return *(m_docHLs.first()); + else + if (m_viewHLs.values().first() && m_viewHLs.values().first()->count() == 1) + if (m_viewHLs.keys().first() == view && m_viewHLs.values().first()) + return *(m_viewHLs.values().first()->first()); + //--- END Temporary optimisation --- + + if (view) { + QPtrList* list = m_viewHLs[view]; + if (list) + for (KateSuperRangeList* l = list->first(); l; l = list->next()) + if (l->count()) + s_return.appendList(l->rangesIncluding(line)); + + } else { + for (QMap* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) + for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next()) + if (l->count()) + s_return.appendList(l->rangesIncluding(line)); + } + + for (KateSuperRangeList* l = m_docHLs.first(); l; l = m_docHLs.next()) + if (l->count()) + s_return.appendList(l->rangesIncluding(line)); + + return s_return; +} + +void KateArbitraryHighlight::slotTagRange(KateSuperRange* range) +{ + emit tagLines(viewForRange(range), range); +} + +KateView* KateArbitraryHighlight::viewForRange(KateSuperRange* range) +{ + for (QMap* >::Iterator it = m_viewHLs.begin(); it != m_viewHLs.end(); ++it) + for (KateSuperRangeList* l = (*it)->first(); l; l = (*it)->next()) + if (l->contains(range)) + return it.key(); + + // This must belong to a document-global highlight + return 0L; +} + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katearbitraryhighlight.h b/kate/part/katearbitraryhighlight.h new file mode 100644 index 000000000..7955e7889 --- /dev/null +++ b/kate/part/katearbitraryhighlight.h @@ -0,0 +1,87 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Hamish Rodda + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KATEARBITRARYHIGHLIGHT_H +#define KATEARBITRARYHIGHLIGHT_H + +#include "kateattribute.h" +#include "katesupercursor.h" + +#include +#include +#include + +class KateDocument; +class KateView; + +class KateArbitraryHighlightRange : public KateSuperRange, public KateAttribute +{ + Q_OBJECT + +public: + KateArbitraryHighlightRange(KateSuperCursor* start, KateSuperCursor* end, QObject* parent = 0L, const char* name = 0L); + KateArbitraryHighlightRange(KateDocument* doc, const KateRange& range, QObject* parent = 0L, const char* name = 0L); + KateArbitraryHighlightRange(KateDocument* doc, const KateTextCursor& start, const KateTextCursor& end, QObject* parent = 0L, const char* name = 0L); + + virtual ~KateArbitraryHighlightRange(); + + virtual void changed() { slotTagRange(); }; + + static KateAttribute merge(QPtrList ranges); +}; + +/** + * An arbitrary highlighting interface for Kate. + * + * Ideas for more features: + * - integration with syntax highlighting: + * - eg. a signal for when a new context is created, destroyed, changed + * - hopefully make this extension more complimentary to the current syntax highlighting + * - signal for cursor movement + * - signal for mouse movement + * - identical highlight for whole list + * - signals for view movement + */ +class KateArbitraryHighlight : public QObject +{ + Q_OBJECT + +public: + KateArbitraryHighlight(KateDocument* parent = 0L, const char* name = 0L); + + void addHighlightToDocument(KateSuperRangeList* list); + void addHighlightToView(KateSuperRangeList* list, KateView* view); + + KateSuperRangeList& rangesIncluding(uint line, KateView* view = 0L); + +signals: + void tagLines(KateView* view, KateSuperRange* range); + +private slots: + void slotTagRange(KateSuperRange* range); + void slotRangeListDeleted(QObject* obj); +private: + KateView* viewForRange(KateSuperRange* range); + + QMap* > m_viewHLs; + QPtrList m_docHLs; +}; + +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/kateattribute.cpp b/kate/part/kateattribute.cpp new file mode 100644 index 000000000..5de93a406 --- /dev/null +++ b/kate/part/kateattribute.cpp @@ -0,0 +1,268 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Hamish Rodda + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kateattribute.h" + +KateAttribute::KateAttribute() + : m_weight(QFont::Normal) + , m_italic(false) + , m_underline(false) + , m_overline(false) + , m_strikeout(false) + , m_itemsSet(0) + +{ +} + +KateAttribute::~KateAttribute() +{ +} + +void KateAttribute::clear() +{ + m_itemsSet=0; +} + +KateAttribute& KateAttribute::operator+=(const KateAttribute& a) +{ + if (a.itemSet(Weight)) + setWeight(a.weight()); + + if (a.itemSet(Italic)) + setItalic(a.italic()); + + if (a.itemSet(Underline)) + setUnderline(a.underline()); + + if (a.itemSet(Overline)) + setOverline(a.overline()); + + if (a.itemSet(StrikeOut)) + setStrikeOut(a.strikeOut()); + + if (a.itemSet(Outline)) + setOutline(a.outline()); + + if (a.itemSet(TextColor)) + setTextColor(a.textColor()); + + if (a.itemSet(SelectedTextColor)) + setSelectedTextColor(a.selectedTextColor()); + + if (a.itemSet(BGColor)) + setBGColor(a.bgColor()); + + if (a.itemSet(SelectedBGColor)) + setSelectedBGColor(a.selectedBGColor()); + + return *this; +} + +QFont KateAttribute::font(const QFont& ref) +{ + QFont ret = ref; + + if (itemSet(Weight)) + ret.setWeight(weight()); + if (itemSet(Italic)) + ret.setItalic(italic()); + if (itemSet(Underline)) + ret.setUnderline(underline()); + if (itemSet(Overline)) + ret.setOverline(overline()); + if (itemSet(StrikeOut)) + ret.setStrikeOut(strikeOut()); + + return ret; +} + +void KateAttribute::setWeight(int weight) +{ + if (!(m_itemsSet & Weight) || m_weight != weight) + { + m_itemsSet |= Weight; + + m_weight = weight; + + changed(); + } +} + +void KateAttribute::setBold(bool enable) +{ + setWeight(enable ? QFont::Bold : QFont::Normal); +} + +void KateAttribute::setItalic(bool enable) +{ + if (!(m_itemsSet & Italic) || m_italic != enable) + { + m_itemsSet |= Italic; + + m_italic = enable; + + changed(); + } +} + +void KateAttribute::setUnderline(bool enable) +{ + if (!(m_itemsSet & Underline) || m_underline != enable) + { + m_itemsSet |= Underline; + + m_underline = enable; + + changed(); + } +} + +void KateAttribute::setOverline(bool enable) +{ + if (!(m_itemsSet & Overline) || m_overline != enable) + { + m_itemsSet |= Overline; + + m_overline = enable; + + changed(); + } +} + +void KateAttribute::setStrikeOut(bool enable) +{ + if (!(m_itemsSet & StrikeOut) || m_strikeout != enable) + { + m_itemsSet |= StrikeOut; + + m_strikeout = enable; + + changed(); + } +} + +void KateAttribute::setOutline(const QColor& color) +{ + if (!(m_itemsSet & Outline) || m_outline != color) + { + m_itemsSet |= Outline; + + m_outline = color; + + changed(); + } +} + +void KateAttribute::setTextColor(const QColor& color) +{ + if (!(m_itemsSet & TextColor) || m_textColor != color) + { + m_itemsSet |= TextColor; + + m_textColor = color; + + changed(); + } +} + +void KateAttribute::setSelectedTextColor(const QColor& color) +{ + if (!(m_itemsSet & SelectedTextColor) || m_selectedTextColor != color) + { + m_itemsSet |= SelectedTextColor; + + m_selectedTextColor = color; + + changed(); + } +} + +void KateAttribute::setBGColor(const QColor& color) +{ + if (!(m_itemsSet & BGColor) || m_bgColor != color) + { + m_itemsSet |= BGColor; + + m_bgColor = color; + + changed(); + } +} + +void KateAttribute::setSelectedBGColor(const QColor& color) +{ + if (!(m_itemsSet & SelectedBGColor) || m_selectedBGColor != color) + { + m_itemsSet |= SelectedBGColor; + + m_selectedBGColor = color; + + changed(); + } +} + +bool operator ==(const KateAttribute& h1, const KateAttribute& h2) +{ + if (h1.m_itemsSet != h2.m_itemsSet) + return false; + + if (h1.itemSet(KateAttribute::Weight)) + if (h1.m_weight != h2.m_weight) + return false; + + if (h1.itemSet(KateAttribute::Italic)) + if (h1.m_italic != h2.m_italic) + return false; + + if (h1.itemSet(KateAttribute::Underline)) + if (h1.m_underline != h2.m_underline) + return false; + + if (h1.itemSet(KateAttribute::StrikeOut)) + if (h1.m_strikeout != h2.m_strikeout) + return false; + + if (h1.itemSet(KateAttribute::Outline)) + if (h1.m_outline != h2.m_outline) + return false; + + if (h1.itemSet(KateAttribute::TextColor)) + if (h1.m_textColor != h2.m_textColor) + return false; + + if (h1.itemSet(KateAttribute::SelectedTextColor)) + if (h1.m_selectedTextColor != h2.m_selectedTextColor) + return false; + + if (h1.itemSet(KateAttribute::BGColor)) + if (h1.m_bgColor != h2.m_bgColor) + return false; + + if (h1.itemSet(KateAttribute::SelectedBGColor)) + if (h1.m_selectedBGColor != h2.m_selectedBGColor) + return false; + + return true; +} + +bool operator !=(const KateAttribute& h1, const KateAttribute& h2) +{ + return !(h1 == h2); +} + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/kateattribute.h b/kate/part/kateattribute.h new file mode 100644 index 000000000..c4933e690 --- /dev/null +++ b/kate/part/kateattribute.h @@ -0,0 +1,147 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Hamish Rodda + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __KATE_ATTRIBUTE_H__ +#define __KATE_ATTRIBUTE_H__ + +#include "katefont.h" + +#include + +/** + * The Attribute class incorporates all text decorations supported by Kate. + * + * TODO: store the actual font as well. + * TODO: update changed mechanism - use separate bitfield + */ +class KateAttribute +{ +public: + enum items { + Weight = 0x1, + Bold = 0x2, + Italic = 0x4, + Underline = 0x8, + StrikeOut = 0x10, + Outline = 0x20, + TextColor = 0x40, + SelectedTextColor = 0x80, + BGColor = 0x100, + SelectedBGColor = 0x200, + Overline = 0x400 + }; + + KateAttribute(); + virtual ~KateAttribute(); + + QFont font(const QFont& ref); + + inline int width(KateFontStruct& fs, const QString& text, int col, int tabWidth) const + { return fs.width(text, col, bold(), italic(), tabWidth); }; + + // Non-preferred function when you have a string and you want one char's width!! + inline int width(KateFontStruct& fs, const QChar& c, int tabWidth) const + { return fs.width(c, bold(), italic(), tabWidth); }; + + inline bool itemSet(int item) const + { return item & m_itemsSet; }; + + inline bool isSomethingSet() const + { return m_itemsSet; }; + + inline int itemsSet() const + { return m_itemsSet; }; + + inline void clearAttribute(int item) + { m_itemsSet &= (~item); } + + inline int weight() const + { return m_weight; }; + + void setWeight(int weight); + + inline bool bold() const + { return weight() >= QFont::Bold; }; + + void setBold(bool enable = true); + + inline bool italic() const + { return m_italic; }; + + void setItalic(bool enable = true); + + inline bool overline() const + { return m_overline; }; + + void setOverline(bool enable = true); + + inline bool underline() const + { return m_underline; }; + + void setUnderline(bool enable = true); + + inline bool strikeOut() const + { return m_strikeout; }; + + void setStrikeOut(bool enable = true); + + inline const QColor& outline() const + { return m_outline; }; + + void setOutline(const QColor& color); + + inline const QColor& textColor() const + { return m_textColor; }; + + void setTextColor(const QColor& color); + + inline const QColor& selectedTextColor() const + { return m_selectedTextColor; }; + + void setSelectedTextColor(const QColor& color); + + inline const QColor& bgColor() const + { return m_bgColor; }; + + void setBGColor(const QColor& color); + + inline const QColor& selectedBGColor() const + { return m_selectedBGColor; }; + + void setSelectedBGColor(const QColor& color); + + KateAttribute& operator+=(const KateAttribute& a); + + friend bool operator ==(const KateAttribute& h1, const KateAttribute& h2); + friend bool operator !=(const KateAttribute& h1, const KateAttribute& h2); + + virtual void changed() { m_changed = true; }; + bool isChanged() { bool ret = m_changed; m_changed = false; return ret; }; + + void clear(); + +private: + int m_weight; + bool m_italic, m_underline, m_overline,m_strikeout, m_changed; + QColor m_outline, m_textColor, m_selectedTextColor, m_bgColor, m_selectedBGColor; + int m_itemsSet; +}; + +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/kateautoindent.cpp b/kate/part/kateautoindent.cpp new file mode 100644 index 000000000..7c58b6051 --- /dev/null +++ b/kate/part/kateautoindent.cpp @@ -0,0 +1,2543 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Jesse Yurkovich + Copyright (C) 2004 >Anders Lund (KateVarIndent class) + Copyright (C) 2005 Dominik Haumann (basic support for config page) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kateautoindent.h" +#include "kateautoindent.moc" + +#include "kateconfig.h" +#include "katehighlight.h" +#include "katefactory.h" +#include "katejscript.h" +#include "kateview.h" + +#include +#include +#include + +#include + +//BEGIN KateAutoIndent + +KateAutoIndent *KateAutoIndent::createIndenter (KateDocument *doc, uint mode) +{ + if (mode == KateDocumentConfig::imNormal) + return new KateNormalIndent (doc); + else if (mode == KateDocumentConfig::imCStyle) + return new KateCSmartIndent (doc); + else if (mode == KateDocumentConfig::imPythonStyle) + return new KatePythonIndent (doc); + else if (mode == KateDocumentConfig::imXmlStyle) + return new KateXmlIndent (doc); + else if (mode == KateDocumentConfig::imCSAndS) + return new KateCSAndSIndent (doc); + else if ( mode == KateDocumentConfig::imVarIndent ) + return new KateVarIndent ( doc ); +// else if ( mode == KateDocumentConfig::imScriptIndent) +// return new KateScriptIndent ( doc ); + + return new KateAutoIndent (doc); +} + +QStringList KateAutoIndent::listModes () +{ + QStringList l; + + l << modeDescription(KateDocumentConfig::imNone); + l << modeDescription(KateDocumentConfig::imNormal); + l << modeDescription(KateDocumentConfig::imCStyle); + l << modeDescription(KateDocumentConfig::imPythonStyle); + l << modeDescription(KateDocumentConfig::imXmlStyle); + l << modeDescription(KateDocumentConfig::imCSAndS); + l << modeDescription(KateDocumentConfig::imVarIndent); +// l << modeDescription(KateDocumentConfig::imScriptIndent); + + return l; +} + +QString KateAutoIndent::modeName (uint mode) +{ + if (mode == KateDocumentConfig::imNormal) + return QString ("normal"); + else if (mode == KateDocumentConfig::imCStyle) + return QString ("cstyle"); + else if (mode == KateDocumentConfig::imPythonStyle) + return QString ("python"); + else if (mode == KateDocumentConfig::imXmlStyle) + return QString ("xml"); + else if (mode == KateDocumentConfig::imCSAndS) + return QString ("csands"); + else if ( mode == KateDocumentConfig::imVarIndent ) + return QString( "varindent" ); +// else if ( mode == KateDocumentConfig::imScriptIndent ) +// return QString( "scriptindent" ); + + return QString ("none"); +} + +QString KateAutoIndent::modeDescription (uint mode) +{ + if (mode == KateDocumentConfig::imNormal) + return i18n ("Normal"); + else if (mode == KateDocumentConfig::imCStyle) + return i18n ("C Style"); + else if (mode == KateDocumentConfig::imPythonStyle) + return i18n ("Python Style"); + else if (mode == KateDocumentConfig::imXmlStyle) + return i18n ("XML Style"); + else if (mode == KateDocumentConfig::imCSAndS) + return i18n ("S&S C Style"); + else if ( mode == KateDocumentConfig::imVarIndent ) + return i18n("Variable Based Indenter"); +// else if ( mode == KateDocumentConfig::imScriptIndent ) +// return i18n("JavaScript Indenter"); + + return i18n ("None"); +} + +uint KateAutoIndent::modeNumber (const QString &name) +{ + if (modeName(KateDocumentConfig::imNormal) == name) + return KateDocumentConfig::imNormal; + else if (modeName(KateDocumentConfig::imCStyle) == name) + return KateDocumentConfig::imCStyle; + else if (modeName(KateDocumentConfig::imPythonStyle) == name) + return KateDocumentConfig::imPythonStyle; + else if (modeName(KateDocumentConfig::imXmlStyle) == name) + return KateDocumentConfig::imXmlStyle; + else if (modeName(KateDocumentConfig::imCSAndS) == name) + return KateDocumentConfig::imCSAndS; + else if ( modeName( KateDocumentConfig::imVarIndent ) == name ) + return KateDocumentConfig::imVarIndent; +// else if ( modeName( KateDocumentConfig::imScriptIndent ) == name ) +// return KateDocumentConfig::imScriptIndent; + + return KateDocumentConfig::imNone; +} + +bool KateAutoIndent::hasConfigPage (uint mode) +{ +// if ( mode == KateDocumentConfig::imScriptIndent ) +// return true; + + return false; +} + +IndenterConfigPage* KateAutoIndent::configPage(QWidget *parent, uint mode) +{ +// if ( mode == KateDocumentConfig::imScriptIndent ) +// return new ScriptIndentConfigPage(parent, "script_indent_config_page"); + + return 0; +} + +KateAutoIndent::KateAutoIndent (KateDocument *_doc) +: QObject(), doc(_doc) +{ +} +KateAutoIndent::~KateAutoIndent () +{ +} + +//END KateAutoIndent + +//BEGIN KateViewIndentAction +KateViewIndentationAction::KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject* parent, const char* name) + : KActionMenu (text, parent, name), doc(_doc) +{ + connect(popupMenu(),SIGNAL(aboutToShow()),this,SLOT(slotAboutToShow())); +} + +void KateViewIndentationAction::slotAboutToShow() +{ + QStringList modes = KateAutoIndent::listModes (); + + popupMenu()->clear (); + for (uint z=0; zinsertItem ( '&' + KateAutoIndent::modeDescription(z).replace('&', "&&"), this, SLOT(setMode(int)), 0, z); + + popupMenu()->setItemChecked (doc->config()->indentationMode(), true); +} + +void KateViewIndentationAction::setMode (int mode) +{ + doc->config()->setIndentationMode((uint)mode); +} +//END KateViewIndentationAction + +//BEGIN KateNormalIndent + +KateNormalIndent::KateNormalIndent (KateDocument *_doc) + : KateAutoIndent (_doc) +{ + // if highlighting changes, update attributes + connect(_doc, SIGNAL(hlChanged()), this, SLOT(updateConfig())); +} + +KateNormalIndent::~KateNormalIndent () +{ +} + +void KateNormalIndent::updateConfig () +{ + KateDocumentConfig *config = doc->config(); + + useSpaces = config->configFlags() & KateDocument::cfSpaceIndent || config->configFlags() & KateDocumentConfig::cfReplaceTabsDyn; + mixedIndent = useSpaces && config->configFlags() & KateDocumentConfig::cfMixedIndent; + keepProfile = config->configFlags() & KateDocument::cfKeepIndentProfile; + tabWidth = config->tabWidth(); + indentWidth = useSpaces? config->indentationWidth() : tabWidth; + + commentAttrib = 255; + doxyCommentAttrib = 255; + regionAttrib = 255; + symbolAttrib = 255; + alertAttrib = 255; + tagAttrib = 255; + wordAttrib = 255; + keywordAttrib = 255; + normalAttrib = 255; + extensionAttrib = 255; + preprocessorAttrib = 255; + stringAttrib = 255; + charAttrib = 255; + + KateHlItemDataList items; + doc->highlight()->getKateHlItemDataListCopy (0, items); + + for (uint i=0; iname; + if (name.find("Comment") != -1 && commentAttrib == 255) + { + commentAttrib = i; + } + else if (name.find("Region Marker") != -1 && regionAttrib == 255) + { + regionAttrib = i; + } + else if (name.find("Symbol") != -1 && symbolAttrib == 255) + { + symbolAttrib = i; + } + else if (name.find("Alert") != -1) + { + alertAttrib = i; + } + else if (name.find("Comment") != -1 && commentAttrib != 255 && doxyCommentAttrib == 255) + { + doxyCommentAttrib = i; + } + else if (name.find("Tags") != -1 && tagAttrib == 255) + { + tagAttrib = i; + } + else if (name.find("Word") != -1 && wordAttrib == 255) + { + wordAttrib = i; + } + else if (name.find("Keyword") != -1 && keywordAttrib == 255) + { + keywordAttrib = i; + } + else if (name.find("Normal") != -1 && normalAttrib == 255) + { + normalAttrib = i; + } + else if (name.find("Extensions") != -1 && extensionAttrib == 255) + { + extensionAttrib = i; + } + else if (name.find("Preprocessor") != -1 && preprocessorAttrib == 255) + { + preprocessorAttrib = i; + } + else if (name.find("String") != -1 && stringAttrib == 255) + { + stringAttrib = i; + } + else if (name.find("Char") != -1 && charAttrib == 255) + { + charAttrib = i; + } + } +} + +bool KateNormalIndent::isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const +{ + int parenOpen = 0; + bool atLeastOne = false; + bool getNext = false; + + pos = doc->plainKateTextLine(begin.line())->firstChar(); + + // Iterate one-by-one finding opening and closing chars + // Assume that open and close are 'Symbol' characters + while (begin < end) + { + QChar c = begin.currentChar(); + if (begin.currentAttrib() == symbolAttrib) + { + if (c == open) + { + if (!atLeastOne) + { + atLeastOne = true; + getNext = true; + pos = measureIndent(begin) + 1; + } + parenOpen++; + } + else if (c == close) + { + parenOpen--; + } + } + else if (getNext && !c.isSpace()) + { + getNext = false; + pos = measureIndent(begin); + } + + if (atLeastOne && parenOpen <= 0) + return true; + + if (!begin.moveForward(1)) + break; + } + + return (atLeastOne) ? false : true; +} + +bool KateNormalIndent::skipBlanks (KateDocCursor &cur, KateDocCursor &max, bool newline) const +{ + int curLine = cur.line(); + if (newline) + cur.moveForward(1); + + if (cur >= max) + return false; + + do + { + uchar attrib = cur.currentAttrib(); + const QString hlFile = doc->highlight()->hlKeyForAttrib( attrib ); + + if (attrib != commentAttrib && attrib != regionAttrib && attrib != alertAttrib && attrib != preprocessorAttrib && !hlFile.endsWith("doxygen.xml")) + { + QChar c = cur.currentChar(); + if (!c.isNull() && !c.isSpace()) + break; + } + + if (!cur.moveForward(1)) + { + // not able to move forward, so set cur to max + cur = max; + break; + } + // Make sure col is 0 if we spill into next line i.e. count the '\n' as a character + if (curLine != cur.line()) + { + if (!newline) + break; + curLine = cur.line(); + cur.setCol(0); + } + } while (cur < max); + + if (cur > max) + cur = max; + return true; +} + +uint KateNormalIndent::measureIndent (KateDocCursor &cur) const +{ + // We cannot short-cut by checking for useSpaces because there may be + // tabs in the line despite this setting. + + return doc->plainKateTextLine(cur.line())->cursorX(cur.col(), tabWidth); +} + +QString KateNormalIndent::tabString(uint pos) const +{ + QString s; + pos = kMin (pos, 80U); // sanity check for large values of pos + + if (!useSpaces || mixedIndent) + { + while (pos >= tabWidth) + { + s += '\t'; + pos -= tabWidth; + } + } + while (pos > 0) + { + s += ' '; + pos--; + } + return s; +} + +void KateNormalIndent::processNewline (KateDocCursor &begin, bool /*needContinue*/) +{ + int line = begin.line() - 1; + int pos = begin.col(); + + while ((line > 0) && (pos < 0)) // search a not empty text line + pos = doc->plainKateTextLine(--line)->firstChar(); + + if (pos > 0) + { + QString filler = doc->text(line, 0, line, pos); + doc->insertText(begin.line(), 0, filler); + begin.setCol(filler.length()); + } + else + begin.setCol(0); +} + +//END + +//BEGIN KateCSmartIndent + +KateCSmartIndent::KateCSmartIndent (KateDocument *doc) +: KateNormalIndent (doc), + allowSemi (false), + processingBlock (false) +{ + kdDebug(13030)<<"CREATING KATECSMART INTDETER"<plainKateTextLine(line.line()); + + int firstChar = textLine->firstChar(); + // Empty line is worthless ... but only when doing more than 1 line + if (firstChar == -1 && processingBlock) + return; + + uint indent = 0; + + // TODO Here we do not check for beginning and ending comments ... + QChar first = textLine->getChar(firstChar); + QChar last = textLine->getChar(textLine->lastChar()); + + if (first == '}') + { + indent = findOpeningBrace(line); + } + else if (first == ')') + { + indent = findOpeningParen(line); + } + else if (first == '{') + { + // If this is the first brace, we keep the indent at 0 + KateDocCursor temp(line.line(), firstChar, doc); + if (!firstOpeningBrace(temp)) + indent = calcIndent(temp, false); + } + else if (first == ':') + { + // Initialization lists (handle c++ and c#) + int pos = findOpeningBrace(line); + if (pos == 0) + indent = indentWidth; + else + indent = pos + (indentWidth * 2); + } + else if (last == ':') + { + if (textLine->stringAtPos (firstChar, "case") || + textLine->stringAtPos (firstChar, "default") || + textLine->stringAtPos (firstChar, "public") || + textLine->stringAtPos (firstChar, "private") || + textLine->stringAtPos (firstChar, "protected") || + textLine->stringAtPos (firstChar, "signals") || + textLine->stringAtPos (firstChar, "Q_SIGNALS") || + textLine->stringAtPos (firstChar, "Q_SLOTS") || + textLine->stringAtPos (firstChar, "slots")) + { + indent = findOpeningBrace(line) + indentWidth; + } + } + else if (first == '*') + { + if (last == '/') + { + int lineEnd = textLine->lastChar(); + if (lineEnd > 0 && textLine->getChar(lineEnd - 1) == '*') + { + indent = findOpeningComment(line); + if (textLine->attribute(firstChar) == doxyCommentAttrib) + indent++; + } + else + return; + } + else + { + KateDocCursor temp = line; + if (textLine->attribute(firstChar) == doxyCommentAttrib) + indent = calcIndent(temp, false) + 1; + else + indent = calcIndent(temp, true); + } + } + else if (first == '#') + { + // c# regions + if (textLine->stringAtPos (firstChar, "#region") || + textLine->stringAtPos (firstChar, "#endregion")) + { + KateDocCursor temp = line; + indent = calcIndent(temp, true); + } + } + else + { + // Everything else ... + if (first == '/' && last != '/') + return; + + KateDocCursor temp = line; + indent = calcIndent(temp, true); + if (indent == 0) + { + KateNormalIndent::processNewline(line, true); + return; + } + } + + // Slightly faster if we don't indent what we don't have to + if (indent != measureIndent(line) || first == '}' || first == '{' || first == '#') + { + doc->removeText(line.line(), 0, line.line(), firstChar); + QString filler = tabString(indent); + if (indent > 0) doc->insertText(line.line(), 0, filler); + if (!processingBlock) line.setCol(filler.length()); + } +} + +void KateCSmartIndent::processSection (const KateDocCursor &begin, const KateDocCursor &end) +{ + kdDebug(13030)<<"PROCESS SECTION"< 0) ? true : false; + + while (cur.line() <= end.line()) + { + processLine (cur); + if (!cur.gotoNextLine()) + break; + } + + processingBlock = false; + kdDebug(13030) << "+++ total: " << t.elapsed() << endl; +} + +bool KateCSmartIndent::handleDoxygen (KateDocCursor &begin) +{ + // Factor out the rather involved Doxygen stuff here ... + int line = begin.line(); + int first = -1; + while ((line > 0) && (first < 0)) + first = doc->plainKateTextLine(--line)->firstChar(); + + if (first >= 0) + { + KateTextLine::Ptr textLine = doc->plainKateTextLine(line); + bool insideDoxygen = false; + bool justAfterDoxygen = false; + if (textLine->attribute(first) == doxyCommentAttrib || textLine->attribute(textLine->lastChar()) == doxyCommentAttrib) + { + const int last = textLine->lastChar(); + if (last <= 0 || !(justAfterDoxygen = textLine->stringAtPos(last-1, "*/"))) + insideDoxygen = true; + if (justAfterDoxygen) + justAfterDoxygen &= textLine->string().find("/**") < 0; + while (textLine->attribute(first) != doxyCommentAttrib && first <= textLine->lastChar()) + first++; + if (textLine->stringAtPos(first, "//")) + return false; + } + + // Align the *'s and then go ahead and insert one too ... + if (insideDoxygen) + { + textLine = doc->plainKateTextLine(begin.line()); + first = textLine->firstChar(); + int indent = findOpeningComment(begin); + QString filler = tabString (indent); + + bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping; + + if ( doxygenAutoInsert && + ((first < 0) || (!textLine->stringAtPos(first, "*/") && !textLine->stringAtPos(first, "*")))) + { + filler = filler + " * "; + } + + doc->removeText (begin.line(), 0, begin.line(), first); + doc->insertText (begin.line(), 0, filler); + begin.setCol(filler.length()); + + return true; + } + // Align position with beginning of doxygen comment. Otherwise the + // indentation is one too much. + else if (justAfterDoxygen) + { + textLine = doc->plainKateTextLine(begin.line()); + first = textLine->firstChar(); + int indent = findOpeningComment(begin); + QString filler = tabString (indent); + + doc->removeText (begin.line(), 0, begin.line(), first); + doc->insertText (begin.line(), 0, filler); + begin.setCol(filler.length()); + + return true; + } + } + + return false; +} + +void KateCSmartIndent::processNewline (KateDocCursor &begin, bool needContinue) +{ + if (!handleDoxygen (begin)) + { + KateTextLine::Ptr textLine = doc->plainKateTextLine(begin.line()); + bool inMiddle = textLine->firstChar() > -1; + + int indent = calcIndent (begin, needContinue); + + if (indent > 0 || inMiddle) + { + QString filler = tabString (indent); + doc->insertText (begin.line(), 0, filler); + begin.setCol(filler.length()); + + // Handles cases where user hits enter at the beginning or middle of text + if (inMiddle) + { + processLine(begin); + begin.setCol(textLine->firstChar()); + } + } + else + { + KateNormalIndent::processNewline (begin, needContinue); + } + + if (begin.col() < 0) + begin.setCol(0); + } +} + +/** + * Returns true when the given attribute matches any "colon influence immune" + * attribute + * @param indenter indenter + * @param attr1 attribute of previous char + * @param attr2 attribute of char preceding previous char + * @param prev1 previous character (0 if none) + * @param prev2 character preceding previous character (0 if none) + */ +static inline bool isColonImmune(const KateNormalIndent &indenter, + uchar attr1, uchar attr2, + QChar prev1, QChar prev2) +{ + return attr1 == indenter.preprocessorAttrib + // FIXME: no way to discriminate against multiline comment and single + // line comment. Therefore, using prev? is futile. + || attr1 == indenter.commentAttrib /*&& prev2 != '*' && prev1 != '/'*/ + || attr1 == indenter.doxyCommentAttrib + || attr1 == indenter.stringAttrib && (attr2 != indenter.stringAttrib + || (prev1 != '"' || prev2 == '\\' && attr2 == indenter.charAttrib)) + || prev1 == '\'' && attr1 != indenter.charAttrib; +} + +/** + * Returns true when the colon is allowed to reindent the current line + * @param indenter current indenter + * @param line current line + * @param curCol column of most recently input character + */ +static inline bool colonPermitsReindent(const KateNormalIndent &indenter, + const KateTextLine::Ptr &line, + int curCol + ) +{ + const QString txt = line->string(0,curCol); + // do we have any significant preceding colon? + for (int pos = 0; (pos = txt.find(':', pos)) >= 0; pos++) { + if (line->attribute(pos) == indenter.symbolAttrib) + // yes, it has already contributed to this line's indentation, don't + // indent again + return false; + } + + // otherwise, check whether this colon is not within an influence + // immune attribute range + return !isColonImmune(indenter, line->attribute(curCol - 1), + line->attribute(curCol - 2), + txt[curCol - 1], txt[curCol - 2]); +} + +void KateCSmartIndent::processChar(QChar c) +{ + // You may be curious about 'n' among the triggers: + // It is used to discriminate C#'s #region/#endregion which are indented + // against normal preprocessing statements which aren't indented. + static const QString triggers("}{)/:#n"); + static const QString firstTriggers("}{)/:#"); + static const QString lastTriggers(":n"); + if (triggers.find(c) < 0) + return; + + KateView *view = doc->activeView(); + int curCol = view->cursorColumnReal() - 1; + KateDocCursor begin(view->cursorLine(), 0, doc); + + KateTextLine::Ptr textLine = doc->plainKateTextLine(begin.line()); + const QChar curChar = textLine->getChar(curCol); + const int first = textLine->firstChar(); + const QChar firstChar = textLine->getChar(first); + +#if 0 // nice try + // Only indent on symbols or preprocessing directives -- never on + // anything else + kdDebug() << "curChar " << curChar << " curCol " << curCol << " textlen " << textLine->length() << " a " << textLine->attribute( curCol ) << " sym " << symbolAttrib << " pp " << preprocessorAttrib << endl; + if (!(((curChar == '#' || curChar == 'n') + && textLine->attribute( curCol ) == preprocessorAttrib) + || textLine->attribute( curCol ) == symbolAttrib) + ) + return; + kdDebug() << "curChar " << curChar << endl; +#endif + + if (c == 'n') + { + if (firstChar != '#' || textLine->string(curCol-5, 5) != QString::fromLatin1("regio")) + return; + } + + if ( c == '/' ) + { + // dominik: if line is "* /", change it to "*/" + if ( textLine->attribute( begin.col() ) == doxyCommentAttrib ) + { + // if the first char exists and is a '*', and the next non-space-char + // is already the just typed '/', concatenate it to "*/". + if ( first != -1 + && firstChar == '*' + && textLine->nextNonSpaceChar( first+1 ) == view->cursorColumnReal()-1 ) + doc->removeText( view->cursorLine(), first+1, view->cursorLine(), view->cursorColumnReal()-1); + } + + // ls: never have comments change the indentation. + return; + } + + // ls: only reindent line if the user actually expects it + // I. e. take action on single braces on line or last colon, but inhibit + // any reindentation if any of those characters appear amidst some section + // of the line + const QChar lastChar = textLine->getChar(textLine->lastChar()); + int pos; + if (((c == firstChar && firstTriggers.find(firstChar) >= 0) + || (c == lastChar && lastTriggers.find(lastChar) >= 0)) + && (c != ':' || colonPermitsReindent(*this, textLine, curCol))) + processLine(begin); +} + + +uint KateCSmartIndent::calcIndent(KateDocCursor &begin, bool needContinue) +{ + KateTextLine::Ptr textLine; + KateDocCursor cur = begin; + + uint anchorIndent = 0; + int anchorPos = 0; + int parenCount = 0; // Possibly in a multiline for stmt. Used to skip ';' ... + bool found = false; + bool isSpecial = false; + bool potentialAnchorSeen = false; + bool isArg = false; // ...arg, + bool parenthesizedArg = false; // ...(arg, + + //kdDebug(13030) << "calcIndent begin line:" << begin.line() << " col:" << begin.col() << endl; + + // Find Indent Anchor Point + while (cur.gotoPreviousLine()) + { + isSpecial = found = false; + textLine = doc->plainKateTextLine(cur.line()); + + // Skip comments and handle cases like if (...) { stmt; + int pos = textLine->lastChar(); + int openCount = 0; + int otherAnchor = -1; + do + { + if (textLine->attribute(pos) == symbolAttrib) + { + QChar tc = textLine->getChar (pos); + if ((tc == ';' || tc == ':' || tc == ',') && otherAnchor == -1 && parenCount <= 0) { + otherAnchor = pos, potentialAnchorSeen = true; + isArg = tc == ','; + } else if (tc == ')') + parenCount++; + else if (tc == '(') + parenCount--, parenthesizedArg = isArg, potentialAnchorSeen = true; + else if (tc == '}') + openCount--; + else if (tc == '{') + { + openCount++, potentialAnchorSeen = true; + if (openCount == 1) + break; + } + } + } while (--pos >= textLine->firstChar()); + + if (openCount != 0 || otherAnchor != -1) + { + found = true; + QChar c; + if (openCount > 0) + c = '{'; + else if (openCount < 0) + c = '}'; + else if (otherAnchor >= 0) + c = textLine->getChar (otherAnchor); + + int specialIndent = 0; + if (c == ':' && needContinue) + { + QChar ch; + specialIndent = textLine->firstChar(); + if (textLine->stringAtPos(specialIndent, "case")) + ch = textLine->getChar(specialIndent + 4); + else if (textLine->stringAtPos(specialIndent, "default")) + ch = textLine->getChar(specialIndent + 7); + else if (textLine->stringAtPos(specialIndent, "public")) + ch = textLine->getChar(specialIndent + 6); + else if (textLine->stringAtPos(specialIndent, "private")) + ch = textLine->getChar(specialIndent + 7); + else if (textLine->stringAtPos(specialIndent, "protected")) + ch = textLine->getChar(specialIndent + 9); + else if (textLine->stringAtPos(specialIndent, "signals")) + ch = textLine->getChar(specialIndent + 7); + else if (textLine->stringAtPos(specialIndent, "Q_SIGNALS")) + ch = textLine->getChar(specialIndent + 9); + else if (textLine->stringAtPos(specialIndent, "slots")) + ch = textLine->getChar(specialIndent + 5); + else if (textLine->stringAtPos(specialIndent, "Q_SLOTS")) + ch = textLine->getChar(specialIndent + 7); + + if (ch.isNull() || (!ch.isSpace() && ch != '(' && ch != ':')) + continue; + + KateDocCursor lineBegin = cur; + lineBegin.setCol(specialIndent); + specialIndent = measureIndent(lineBegin); + isSpecial = true; + } + + // Move forward past blank lines + KateDocCursor skip = cur; + skip.setCol(textLine->lastChar()); + bool result = skipBlanks(skip, begin, true); + + anchorPos = skip.col(); + anchorIndent = measureIndent(skip); + + //kdDebug(13030) << "calcIndent anchorPos:" << anchorPos << " anchorIndent:" << anchorIndent << " at line:" << skip.line() << endl; + + // Accept if it's before requested position or if it was special + if (result && skip < begin) + { + cur = skip; + break; + } + else if (isSpecial) + { + anchorIndent = specialIndent; + break; + } + + // Are these on a line by themselves? (i.e. both last and first char) + if ((c == '{' || c == '}') && textLine->getChar(textLine->firstChar()) == c) + { + cur.setCol(anchorPos = textLine->firstChar()); + anchorIndent = measureIndent (cur); + break; + } + } + } + + // treat beginning of document as anchor position + if (cur.line() == 0 && cur.col() == 0 && potentialAnchorSeen) + found = true; + + if (!found) + return 0; + + uint continueIndent = (needContinue) ? calcContinue (cur, begin) : 0; + //kdDebug(13030) << "calcIndent continueIndent:" << continueIndent << endl; + + // Move forward from anchor and determine last known reference character + // Braces take precedance over others ... + textLine = doc->plainKateTextLine(cur.line()); + QChar lastChar = textLine->getChar (anchorPos); + int lastLine = cur.line(); + if (lastChar == '#' || lastChar == '[') + { + // Never continue if # or [ is encountered at this point here + // A fail-safe really... most likely an #include, #region, or a c# attribute + continueIndent = 0; + } + + int openCount = 0; + while (cur.validPosition() && cur < begin) + { + if (!skipBlanks(cur, begin, true)) + return isArg && !parenthesizedArg ? begin.col() : 0; + + QChar tc = cur.currentChar(); + //kdDebug(13030) << " cur.line:" << cur.line() << " cur.col:" << cur.col() << " currentChar '" << tc << "' " << textLine->attribute(cur.col()) << endl; + if (cur == begin || tc.isNull()) + break; + + if (!tc.isSpace() && cur < begin) + { + uchar attrib = cur.currentAttrib(); + if (tc == '{' && attrib == symbolAttrib) + openCount++; + else if (tc == '}' && attrib == symbolAttrib) + openCount--; + + lastChar = tc; + lastLine = cur.line(); + } + } + if (openCount > 0) // Open braces override + lastChar = '{'; + + uint indent = 0; + //kdDebug(13030) << "calcIndent lastChar '" << lastChar << "'" << endl; + + if (lastChar == '{' || (lastChar == ':' && isSpecial && needContinue)) + { + indent = anchorIndent + indentWidth; + } + else if (lastChar == '}') + { + indent = anchorIndent; + } + else if (lastChar == ';') + { + indent = anchorIndent + ((allowSemi && needContinue) ? continueIndent : 0); + } + else if (lastChar == ',' || lastChar == '(') + { + textLine = doc->plainKateTextLine(lastLine); + KateDocCursor start(lastLine, textLine->firstChar(), doc); + KateDocCursor finish(lastLine, textLine->lastChar() + 1, doc); + uint pos = 0; + + if (isBalanced(start, finish, QChar('('), QChar(')'), pos) && false) + indent = anchorIndent; + else + { + // TODO: Config option. If we're below 48, go ahead and line them up + indent = ((pos < 48) ? pos : anchorIndent + (indentWidth * 2)); + } + } + else if (!lastChar.isNull()) + { + if (anchorIndent != 0) + indent = anchorIndent + continueIndent; + else + indent = continueIndent; + } + + return indent; +} + +uint KateCSmartIndent::calcContinue(KateDocCursor &start, KateDocCursor &end) +{ + KateDocCursor cur = start; + + bool needsBalanced = true; + bool isFor = false; + allowSemi = false; + + KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); + + // Handle cases such as } while (s ... by skipping the leading symbol + if (textLine->attribute(cur.col()) == symbolAttrib) + { + cur.moveForward(1); + skipBlanks(cur, end, false); + } + + if (textLine->getChar(cur.col()) == '}') + { + skipBlanks(cur, end, true); + if (cur.line() != start.line()) + textLine = doc->plainKateTextLine(cur.line()); + + if (textLine->stringAtPos(cur.col(), "else")) + cur.setCol(cur.col() + 4); + else + return indentWidth * 2; + + needsBalanced = false; + } + else if (textLine->stringAtPos(cur.col(), "else")) + { + cur.setCol(cur.col() + 4); + needsBalanced = false; + int next = textLine->nextNonSpaceChar(cur.col()); + if (next >= 0 && textLine->stringAtPos(next, "if")) + { + cur.setCol(next + 2); + needsBalanced = true; + } + } + else if (textLine->stringAtPos(cur.col(), "if")) + { + cur.setCol(cur.col() + 2); + } + else if (textLine->stringAtPos(cur.col(), "do")) + { + cur.setCol(cur.col() + 2); + needsBalanced = false; + } + else if (textLine->stringAtPos(cur.col(), "for")) + { + cur.setCol(cur.col() + 3); + isFor = true; + } + else if (textLine->stringAtPos(cur.col(), "while")) + { + cur.setCol(cur.col() + 5); + } + else if (textLine->stringAtPos(cur.col(), "switch")) + { + cur.setCol(cur.col() + 6); + } + else if (textLine->stringAtPos(cur.col(), "using")) + { + cur.setCol(cur.col() + 5); + } + else + { + return indentWidth * 2; + } + + uint openPos = 0; + if (needsBalanced && !isBalanced (cur, end, QChar('('), QChar(')'), openPos)) + { + allowSemi = isFor; + if (openPos > 0) + return (openPos - textLine->firstChar()); + else + return indentWidth * 2; + } + + // Check if this statement ends a line now + skipBlanks(cur, end, false); + if (cur == end) + return indentWidth; + + if (skipBlanks(cur, end, true)) + { + if (cur == end) + return indentWidth; + else + return indentWidth + calcContinue(cur, end); + } + + return 0; +} + +uint KateCSmartIndent::findOpeningBrace(KateDocCursor &start) +{ + KateDocCursor cur = start; + int count = 1; + + // Move backwards 1 by 1 and find the opening brace + // Return the indent of that line + while (cur.moveBackward(1)) + { + if (cur.currentAttrib() == symbolAttrib) + { + QChar ch = cur.currentChar(); + if (ch == '{') + count--; + else if (ch == '}') + count++; + + if (count == 0) + { + KateDocCursor temp(cur.line(), doc->plainKateTextLine(cur.line())->firstChar(), doc); + return measureIndent(temp); + } + } + } + + return 0; +} + +bool KateCSmartIndent::firstOpeningBrace(KateDocCursor &start) +{ + KateDocCursor cur = start; + + // Are we the first opening brace at this level? + while(cur.moveBackward(1)) + { + if (cur.currentAttrib() == symbolAttrib) + { + QChar ch = cur.currentChar(); + if (ch == '{') + return false; + else if (ch == '}' && cur.col() == 0) + break; + } + } + + return true; +} + +uint KateCSmartIndent::findOpeningParen(KateDocCursor &start) +{ + KateDocCursor cur = start; + int count = 1; + + // Move backwards 1 by 1 and find the opening ( + // Return the indent of that line + while (cur.moveBackward(1)) + { + if (cur.currentAttrib() == symbolAttrib) + { + QChar ch = cur.currentChar(); + if (ch == '(') + count--; + else if (ch == ')') + count++; + + if (count == 0) + return measureIndent(cur); + } + } + + return 0; +} + +uint KateCSmartIndent::findOpeningComment(KateDocCursor &start) +{ + KateDocCursor cur = start; + + // Find the line with the opening /* and return the proper indent + do + { + KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); + + int pos = textLine->string().find("/*", false); + if (pos >= 0) + { + KateDocCursor temp(cur.line(), pos, doc); + return measureIndent(temp); + } + + } while (cur.gotoPreviousLine()); + + return 0; +} + +//END + +//BEGIN KatePythonIndent + +QRegExp KatePythonIndent::endWithColon = QRegExp( "^[^#]*:\\s*(#.*)?$" ); +QRegExp KatePythonIndent::stopStmt = QRegExp( "^\\s*(break|continue|raise|return|pass)\\b.*" ); +QRegExp KatePythonIndent::blockBegin = QRegExp( "^\\s*(class|def|if|elif|else|for|while|try)\\b.*" ); + +KatePythonIndent::KatePythonIndent (KateDocument *doc) +: KateNormalIndent (doc) +{ +} +KatePythonIndent::~KatePythonIndent () +{ +} + +void KatePythonIndent::processNewline (KateDocCursor &begin, bool /*newline*/) +{ + int prevLine = begin.line() - 1; + int prevPos = begin.col(); + + while ((prevLine > 0) && (prevPos < 0)) // search a not empty text line + prevPos = doc->plainKateTextLine(--prevLine)->firstChar(); + + int prevBlock = prevLine; + int prevBlockPos = prevPos; + int extraIndent = calcExtra (prevBlock, prevBlockPos, begin); + + int indent = doc->plainKateTextLine(prevBlock)->cursorX(prevBlockPos, tabWidth); + if (extraIndent == 0) + { + if (!stopStmt.exactMatch(doc->plainKateTextLine(prevLine)->string())) + { + if (endWithColon.exactMatch(doc->plainKateTextLine(prevLine)->string())) + indent += indentWidth; + else + indent = doc->plainKateTextLine(prevLine)->cursorX(prevPos, tabWidth); + } + } + else + indent += extraIndent; + + if (indent > 0) + { + QString filler = tabString (indent); + doc->insertText (begin.line(), 0, filler); + begin.setCol(filler.length()); + } + else + begin.setCol(0); +} + +int KatePythonIndent::calcExtra (int &prevBlock, int &pos, KateDocCursor &end) +{ + int nestLevel = 0; + bool levelFound = false; + while ((prevBlock > 0)) + { + if (blockBegin.exactMatch(doc->plainKateTextLine(prevBlock)->string())) + { + if ((!levelFound && nestLevel == 0) || (levelFound && nestLevel - 1 <= 0)) + { + pos = doc->plainKateTextLine(prevBlock)->firstChar(); + break; + } + + nestLevel --; + } + else if (stopStmt.exactMatch(doc->plainKateTextLine(prevBlock)->string())) + { + nestLevel ++; + levelFound = true; + } + + --prevBlock; + } + + KateDocCursor cur (prevBlock, pos, doc); + QChar c; + int extraIndent = 0; + while (cur.line() < end.line()) + { + c = cur.currentChar(); + + if (c == '(') + extraIndent += indentWidth; + else if (c == ')') + extraIndent -= indentWidth; + else if (c == ':') + break; + else if (c == '\'' || c == '"' ) + traverseString( c, cur, end ); + + if (c.isNull() || c == '#') + cur.gotoNextLine(); + else + cur.moveForward(1); + } + + return extraIndent; +} + +void KatePythonIndent::traverseString( const QChar &stringChar, KateDocCursor &cur, KateDocCursor &end ) +{ + QChar c; + bool escape = false; + + cur.moveForward(1); + c = cur.currentChar(); + while ( ( c != stringChar || escape ) && cur.line() < end.line() ) + { + if ( escape ) + escape = false; + else if ( c == '\\' ) + escape = !escape; + + cur.moveForward(1); + c = cur.currentChar(); + } +} + +//END + +//BEGIN KateXmlIndent + +/* Explanation + +The XML indenter simply inherits the indentation of the previous line, +with the first line starting at 0 (of course!). For each element that +is opened on the previous line, the indentation is increased by one +level; for each element that is closed, it is decreased by one. + +We also have a special case of opening an element on one line and then +entering attributes on the following lines, in which case we would like +to see the following layout: + + + + + +This is accomplished by checking for lines that contain an unclosed open +tag. + +*/ + +const QRegExp KateXmlIndent::startsWithCloseTag("^[ \t]*]*$"); + +KateXmlIndent::KateXmlIndent (KateDocument *doc) +: KateNormalIndent (doc) +{ +} + +KateXmlIndent::~KateXmlIndent () +{ +} + +void KateXmlIndent::processNewline (KateDocCursor &begin, bool /*newline*/) +{ + begin.setCol(processLine(begin.line())); +} + +void KateXmlIndent::processChar (QChar c) +{ + if(c != '/') return; + + // only alter lines that start with a close element + KateView *view = doc->activeView(); + QString text = doc->plainKateTextLine(view->cursorLine())->string(); + if(text.find(startsWithCloseTag) == -1) return; + + // process it + processLine(view->cursorLine()); +} + +void KateXmlIndent::processLine (KateDocCursor &line) +{ + processLine (line.line()); +} + +void KateXmlIndent::processSection (const KateDocCursor &start, const KateDocCursor &end) +{ + KateDocCursor cur (start); + int endLine = end.line(); + + do { + processLine(cur.line()); + if(!cur.gotoNextLine()) break; + } while(cur.line() < endLine); +} + +void KateXmlIndent::getLineInfo (uint line, uint &prevIndent, int &numTags, + uint &attrCol, bool &unclosedTag) +{ + prevIndent = 0; + int firstChar; + KateTextLine::Ptr prevLine = 0; + + // get the indentation of the first non-empty line + while(true) { + prevLine = doc->plainKateTextLine(line); + if( (firstChar = prevLine->firstChar()) < 0) { + if(!line--) return; + continue; + } + break; + } + prevIndent = prevLine->cursorX(prevLine->firstChar(), tabWidth); + QString text = prevLine->string(); + + // special case: + // + // + // requires that we discount the from the number of closed tags + if(text.find(startsWithCloseTag) != -1) ++numTags; + + // count the number of open and close tags + int lastCh = 0; + uint pos, len = text.length(); + bool seenOpen = false; + for(pos = 0; pos < len; ++pos) { + int ch = text.at(pos).unicode(); + switch(ch) { + case '<': + seenOpen = true; + unclosedTag = true; + attrCol = pos; + ++numTags; + break; + + // don't indent because of DOCTYPE, comment, CDATA, etc. + case '!': + if(lastCh == '<') --numTags; + break; + + // don't indent because of xml decl or PI + case '?': + if(lastCh == '<') --numTags; + break; + + case '>': + if(!seenOpen) { + // we are on a line like the second one here: + // + // so we need to set prevIndent to the indent of the first line + // + // however, we need to special case "plainKateTextLine(--backLine); + if(x->string().find('<') == -1) continue; + + // recalculate the indent + if(x->string().find(unclosedDoctype) != -1) --numTags; + getLineInfo(backLine, prevIndent, numTags, attrCol, unclosedTag); + break; + } + } + if(lastCh == '/') --numTags; + unclosedTag = false; + break; + + case '/': + if(lastCh == '<') numTags -= 2; // correct for '<', above + break; + } + lastCh = ch; + } + + if(unclosedTag) { + // find the start of the next attribute, so we can align with it + do { + lastCh = text.at(++attrCol).unicode(); + }while(lastCh && lastCh != ' ' && lastCh != '\t'); + + while(lastCh == ' ' || lastCh == '\t') { + lastCh = text.at(++attrCol).unicode(); + } + + attrCol = prevLine->cursorX(attrCol, tabWidth); + } +} + +uint KateXmlIndent::processLine (uint line) +{ + KateTextLine::Ptr kateLine = doc->plainKateTextLine(line); + if(!kateLine) return 0; // sanity check + + // get details from previous line + uint prevIndent = 0, attrCol = 0; + int numTags = 0; + bool unclosedTag = false; // for aligning attributes + + if(line) { + getLineInfo(line - 1, prevIndent, numTags, attrCol, unclosedTag); + } + + // compute new indent + int indent = 0; + if(unclosedTag) indent = attrCol; + else indent = prevIndent + numTags * indentWidth; + if(indent < 0) indent = 0; + + // unindent lines that start with a close tag + if(kateLine->string().find(startsWithCloseTag) != -1) { + indent -= indentWidth; + } + if(indent < 0) indent = 0; + + // apply new indent + doc->removeText(line, 0, line, kateLine->firstChar()); + QString filler = tabString(indent); + doc->insertText(line, 0, filler); + + return filler.length(); +} + +//END + +//BEGIN KateCSAndSIndent + +KateCSAndSIndent::KateCSAndSIndent (KateDocument *doc) +: KateNormalIndent (doc) +{ +} + +void KateCSAndSIndent::updateIndentString() +{ + if( useSpaces ) + indentString.fill( ' ', indentWidth ); + else + indentString = '\t'; +} + +KateCSAndSIndent::~KateCSAndSIndent () +{ +} + +void KateCSAndSIndent::processLine (KateDocCursor &line) +{ + KateTextLine::Ptr textLine = doc->plainKateTextLine(line.line()); + + if (!textLine) + return; + + updateIndentString(); + + const int oldCol = line.col(); + QString whitespace = calcIndent(line); + // strip off existing whitespace + int oldIndent = textLine->firstChar(); + if ( oldIndent < 0 ) + oldIndent = doc->lineLength( line.line() ); + if( oldIndent > 0 ) + doc->removeText(line.line(), 0, line.line(), oldIndent); + // add correct amount + doc->insertText(line.line(), 0, whitespace); + + // try to preserve the cursor position in the line + if ( int(oldCol + whitespace.length()) >= oldIndent ) + line.setCol( oldCol + whitespace.length() - oldIndent ); + else + line.setCol( 0 ); +} + +void KateCSAndSIndent::processSection (const KateDocCursor &begin, const KateDocCursor &end) +{ + QTime t; t.start(); + for( KateDocCursor cur = begin; cur.line() <= end.line(); ) + { + processLine (cur); + if (!cur.gotoNextLine()) + break; + } + kdDebug(13030) << "+++ total: " << t.elapsed() << endl; +} + +/** + * Returns the first @p chars characters of @p line, converted to whitespace. + * If @p convert is set to false, characters at and after the first non-whitespace + * character are removed, not converted. + */ +static QString initialWhitespace(const KateTextLine::Ptr &line, int chars, bool convert = true) +{ + QString text = line->string(0, chars); + if( (int)text.length() < chars ) + { + QString filler; filler.fill(' ',chars - text.length()); + text += filler; + } + for( uint n = 0; n < text.length(); ++n ) + { + if( text[n] != '\t' && text[n] != ' ' ) + { + if( !convert ) + return text.left( n ); + text[n] = ' '; + } + } + return text; +} + +QString KateCSAndSIndent::findOpeningCommentIndentation(const KateDocCursor &start) +{ + KateDocCursor cur = start; + + // Find the line with the opening /* and return the indentation of it + do + { + KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); + + int pos = textLine->string().findRev("/*"); + // FIXME: /* inside /* is possible. This screws up in that case... + if (pos >= 0) + return initialWhitespace(textLine, pos); + } while (cur.gotoPreviousLine()); + + // should never happen. + kdWarning( 13030 ) << " in a comment, but can't find the start of it" << endl; + return QString::null; +} + +bool KateCSAndSIndent::handleDoxygen (KateDocCursor &begin) +{ + // Look backwards for a nonempty line + int line = begin.line(); + int first = -1; + while ((line > 0) && (first < 0)) + first = doc->plainKateTextLine(--line)->firstChar(); + + // no earlier nonempty line + if (first < 0) + return false; + + KateTextLine::Ptr textLine = doc->plainKateTextLine(line); + + // if the line doesn't end with a doxygen comment (that's not closed) + // and doesn't start with a doxygen comment (that's not closed), we don't care. + // note that we do need to check the start of the line, or lines ending with, say, @brief aren't + // recognised. + if ( !(textLine->attribute(textLine->lastChar()) == doxyCommentAttrib && !textLine->endingWith("*/")) && + !(textLine->attribute(textLine->firstChar()) == doxyCommentAttrib && !textLine->string().contains("*/")) ) + return false; + + // our line is inside a doxygen comment. align the *'s and then maybe insert one too ... + textLine = doc->plainKateTextLine(begin.line()); + first = textLine->firstChar(); + QString indent = findOpeningCommentIndentation(begin); + + bool doxygenAutoInsert = doc->config()->configFlags() & KateDocumentConfig::cfDoxygenAutoTyping; + + // starts with *: indent one space more to line up *s + if ( first >= 0 && textLine->stringAtPos(first, "*") ) + indent = indent + " "; + // does not start with *: insert one if user wants that + else if ( doxygenAutoInsert ) + indent = indent + " * "; + // user doesn't want * inserted automatically: put in spaces? + //else + // indent = indent + " "; + + doc->removeText (begin.line(), 0, begin.line(), first); + doc->insertText (begin.line(), 0, indent); + begin.setCol(indent.length()); + + return true; +} + +/** + * @brief User pressed enter. Line has been split; begin is on the new line. + * @param begin Three unrelated variables: the new line number, where the first + * non-whitespace char was on the previous line, and the document. + * @param needContinue Something to do with indenting the current line; always true. + */ +void KateCSAndSIndent::processNewline (KateDocCursor &begin, bool /*needContinue*/) +{ + // in a comment, add a * doxygen-style. + if( handleDoxygen(begin) ) + return; + + // TODO: if the user presses enter in the middle of a label, maybe the first half of the + // label should be indented? + + // where the cursor actually is... + int cursorPos = doc->plainKateTextLine( begin.line() )->firstChar(); + if ( cursorPos < 0 ) + cursorPos = doc->lineLength( begin.line() ); + begin.setCol( cursorPos ); + + processLine( begin ); +} + +/** + * Does the line @p line start with a label? + * @note May also return @c true if the line starts in a continuation. + */ +bool KateCSAndSIndent::startsWithLabel( int line ) +{ + // Get the current line. + KateTextLine::Ptr indentLine = doc->plainKateTextLine(line); + const int indentFirst = indentLine->firstChar(); + + // Not entirely sure what this check does. + int attrib = indentLine->attribute(indentFirst); + if (attrib != 0 && attrib != keywordAttrib && attrib != normalAttrib && attrib != extensionAttrib) + return false; + + // Get the line text. + const QString lineContents = indentLine->string(); + const int indentLast = indentLine->lastChar(); + bool whitespaceFound = false; + for ( int n = indentFirst; n <= indentLast; ++n ) + { + // Get the character as latin1. Can't use QChar::isLetterOrNumber() + // as that includes non 0-9 numbers. + char c = lineContents[n].latin1(); + if ( c == ':' ) + { + // See if the next character is ':' - if so, skip to the character after it. + if ( n < lineContents.length() - 1 ) + { + if ( lineContents[n+1].latin1() == ':' ) + { + n += 2; + continue; + } + } + // Right this is the relevent ':'. + if ( n == indentFirst) + { + // Just a line with a : on it. + return false; + } + // It is a label of some kind! + return true; + } + if (isspace(c)) + { + if (!whitespaceFound) + { + if (lineContents.mid(indentFirst, n - indentFirst) == "case") + return true; + else if (lineContents.mid(indentFirst, n - indentFirst) == "class") + return false; + whitespaceFound = true; + } + } + // All other characters don't indent. + else if ( !isalnum(c) && c != '_' ) + { + return false; + } + } + return false; +} + +template T min(T a, T b) { return (a < b) ? a : b; } + +int KateCSAndSIndent::lastNonCommentChar( const KateDocCursor &line ) +{ + KateTextLine::Ptr textLine = doc->plainKateTextLine( line.line() ); + QString str = textLine->string(); + + // find a possible start-of-comment + int p = -2; // so the first find starts at position 0 + do p = str.find( "//", p + 2 ); + while ( p >= 0 && textLine->attribute(p) != commentAttrib && textLine->attribute(p) != doxyCommentAttrib ); + + // no // found? use whole string + if ( p < 0 ) + p = str.length(); + + // ignore trailing blanks. p starts one-past-the-end. + while( p > 0 && str[p-1].isSpace() ) --p; + return p - 1; +} + +bool KateCSAndSIndent::inForStatement( int line ) +{ + // does this line end in a for ( ... + // with no closing ) ? + int parens = 0, semicolons = 0; + for ( ; line >= 0; --line ) + { + KateTextLine::Ptr textLine = doc->plainKateTextLine(line); + const int first = textLine->firstChar(); + const int last = textLine->lastChar(); + + // look backwards for a symbol: (){}; + // match ()s, {...; and }...; => not in a for + // ; ; ; => not in a for + // ( ; and ( ; ; => a for + for ( int curr = last; curr >= first; --curr ) + { + if ( textLine->attribute(curr) != symbolAttrib ) + continue; + + switch( textLine->getChar(curr) ) + { + case ';': + if( ++semicolons > 2 ) + return false; + break; + case '{': case '}': + return false; + case ')': + ++parens; + break; + case '(': + if( --parens < 0 ) + return true; + break; + } + } + } + // no useful symbols before the ;? + // not in a for then + return false; +} + + +// is the start of the line containing 'begin' in a statement? +bool KateCSAndSIndent::inStatement( const KateDocCursor &begin ) +{ + // if the current line starts with an open brace, it's not a continuation. + // this happens after a function definition (which is treated as a continuation). + KateTextLine::Ptr textLine = doc->plainKateTextLine(begin.line()); + const int first = textLine->firstChar(); + // note that if we're being called from processChar the attribute has not yet been calculated + // should be reasonably safe to assume that unattributed {s are symbols; if the { is in a comment + // we don't want to touch it anyway. + const int attrib = textLine->attribute(first); + if( first >= 0 && (attrib == 0 || attrib == symbolAttrib) && textLine->getChar(first) == '{' ) + return false; + + int line; + for ( line = begin.line() - 1; line >= 0; --line ) + { + textLine = doc->plainKateTextLine(line); + const int first = textLine->firstChar(); + if ( first == -1 ) + continue; + + // starts with #: in a comment, don't care + // outside a comment: preprocessor, don't care + if ( textLine->getChar( first ) == '#' ) + continue; + KateDocCursor currLine = begin; + currLine.setLine( line ); + const int last = lastNonCommentChar( currLine ); + if ( last < first ) + continue; + + // HACK: if we see a comment, assume boldly that this isn't a continuation. + // detecting comments (using attributes) is HARD, since they may have + // embedded alerts, or doxygen stuff, or just about anything. this is + // wrong, and needs fixing. note that only multi-line comments and + // single-line comments continued with \ are affected. + const int attrib = textLine->attribute(last); + if ( attrib == commentAttrib || attrib == doxyCommentAttrib ) + return false; + + char c = textLine->getChar(last); + + // brace => not a continuation. + if ( attrib == symbolAttrib && c == '{' || c == '}' ) + return false; + + // ; => not a continuation, unless in a for (;;) + if ( attrib == symbolAttrib && c == ';' ) + return inForStatement( line ); + + // found something interesting. maybe it's a label? + if ( attrib == symbolAttrib && c == ':' ) + { + // the : above isn't necessarily the : in the label, eg in + // case 'x': a = b ? c : + // this will say no continuation incorrectly. but continued statements + // starting on a line with a label at the start is Bad Style (tm). + if( startsWithLabel( line ) ) + { + // either starts with a label or a continuation. if the current line + // starts in a continuation, we're still in one. if not, this was + // a label, so we're not in one now. so continue to the next line + // upwards. + continue; + } + } + + // any other character => in a continuation + return true; + } + // no non-comment text found before here - not a continuation. + return false; +} + +QString KateCSAndSIndent::continuationIndent( const KateDocCursor &begin ) +{ + if( !inStatement( begin ) ) + return QString::null; + return indentString; +} + +/** + * Figure out how indented the line containing @p begin should be. + */ +QString KateCSAndSIndent::calcIndent (const KateDocCursor &begin) +{ + KateTextLine::Ptr currLine = doc->plainKateTextLine(begin.line()); + int currLineFirst = currLine->firstChar(); + + // if the line starts inside a comment, no change of indentation. + // FIXME: this unnecessarily copies the current indentation over itself. + // FIXME: on newline, this should copy from the previous line. + if ( currLineFirst >= 0 && + (currLine->attribute(currLineFirst) == commentAttrib || + currLine->attribute(currLineFirst) == doxyCommentAttrib) ) + return currLine->string( 0, currLineFirst ); + + // if the line starts with # (but isn't a c# region thingy), no indentation at all. + if( currLineFirst >= 0 && currLine->getChar(currLineFirst) == '#' ) + { + if( !currLine->stringAtPos( currLineFirst+1, QString::fromLatin1("region") ) && + !currLine->stringAtPos( currLineFirst+1, QString::fromLatin1("endregion") ) ) + return QString::null; + } + + /* Strategy: + * Look for an open bracket or brace, or a keyword opening a new scope, whichever comes latest. + * Found a brace: indent one tab in. + * Found a bracket: indent to the first non-white after it. + * Found a keyword: indent one tab in. for try, catch and switch, if newline is set, also add + * an open brace, a newline, and indent two tabs in. + */ + KateDocCursor cur = begin; + int pos, openBraceCount = 0, openParenCount = 0; + bool lookingForScopeKeywords = true; + const char * const scopeKeywords[] = { "for", "do", "while", "if", "else" }; + const char * const blockScopeKeywords[] = { "try", "catch", "switch" }; + + while (cur.gotoPreviousLine()) + { + KateTextLine::Ptr textLine = doc->plainKateTextLine(cur.line()); + const int lastChar = textLine->lastChar(); + const int firstChar = textLine->firstChar(); + + // look through line backwards for interesting characters + for( pos = lastChar; pos >= firstChar; --pos ) + { + if (textLine->attribute(pos) == symbolAttrib) + { + char tc = textLine->getChar (pos); + switch( tc ) + { + case '(': case '[': + if( ++openParenCount > 0 ) + return calcIndentInBracket( begin, cur, pos ); + break; + case ')': case ']': openParenCount--; break; + case '{': + if( ++openBraceCount > 0 ) + return calcIndentInBrace( begin, cur, pos ); + break; + case '}': openBraceCount--; lookingForScopeKeywords = false; break; + case ';': + if( openParenCount == 0 ) + lookingForScopeKeywords = false; + break; + } + } + + // if we've not had a close brace or a semicolon yet, and we're at the same parenthesis level + // as the cursor, and we're at the start of a scope keyword, indent from it. + if ( lookingForScopeKeywords && openParenCount == 0 && + textLine->attribute(pos) == keywordAttrib && + (pos == 0 || textLine->attribute(pos-1) != keywordAttrib ) ) + { + #define ARRLEN( array ) ( sizeof(array)/sizeof(array[0]) ) + for( uint n = 0; n < ARRLEN(scopeKeywords); ++n ) + if( textLine->stringAtPos(pos, QString::fromLatin1(scopeKeywords[n]) ) ) + return calcIndentAfterKeyword( begin, cur, pos, false ); + for( uint n = 0; n < ARRLEN(blockScopeKeywords); ++n ) + if( textLine->stringAtPos(pos, QString::fromLatin1(blockScopeKeywords[n]) ) ) + return calcIndentAfterKeyword( begin, cur, pos, true ); + #undef ARRLEN + } + } + } + + // no active { in file. + return QString::null; +} + +QString KateCSAndSIndent::calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos) +{ + KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line()); + KateTextLine::Ptr bracketLine = doc->plainKateTextLine(bracketCursor.line()); + + // FIXME: hard-coded max indent to bracket width - use a kate variable + // FIXME: expand tabs first... + if ( bracketPos > 48 ) + { + // how far to indent? we could look back for a brace or keyword, 2 from that. + // as it is, we just indent one more than the line with the ( on it. + // the potential problem with this is when + // you have code ( which does <-- continuation + start of func call + // something like this ); <-- extra indentation for func call + // then again ( + // it works better than ( + // the other method for ( + // cases like this ))); + // consequently, i think this method wins. + return indentString + initialWhitespace( bracketLine, bracketLine->firstChar() ); + } + + const int indentLineFirst = indentLine->firstChar(); + + int indentTo; + const int attrib = indentLine->attribute(indentLineFirst); + if( indentLineFirst >= 0 && (attrib == 0 || attrib == symbolAttrib) && + ( indentLine->getChar(indentLineFirst) == ')' || indentLine->getChar(indentLineFirst) == ']' ) ) + { + // If the line starts with a close bracket, line it up + indentTo = bracketPos; + } + else + { + // Otherwise, line up with the text after the open bracket + indentTo = bracketLine->nextNonSpaceChar( bracketPos + 1 ); + if( indentTo == -1 ) + indentTo = bracketPos + 2; + } + return initialWhitespace( bracketLine, indentTo ); +} + +QString KateCSAndSIndent::calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword) +{ + KateTextLine::Ptr keywordLine = doc->plainKateTextLine(keywordCursor.line()); + KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line()); + + QString whitespaceToKeyword = initialWhitespace( keywordLine, keywordPos, false ); + if( blockKeyword ) { + // FIXME: we could add the open brace and subsequent newline here since they're definitely needed. + } + + // If the line starts with an open brace, don't indent... + int first = indentLine->firstChar(); + // if we're being called from processChar attribute won't be set + const int attrib = indentLine->attribute(first); + if( first >= 0 && (attrib == 0 || attrib == symbolAttrib) && indentLine->getChar(first) == '{' ) + return whitespaceToKeyword; + + // don't check for a continuation. rules are simple here: + // if we're in a non-compound statement after a scope keyword, we indent all lines + // once. so: + // if ( some stuff + // goes here ) + // apples, and <-- continuation here is ignored. but this is Bad Style (tm) anyway. + // oranges too; + return indentString + whitespaceToKeyword; +} + +QString KateCSAndSIndent::calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos) +{ + KateTextLine::Ptr braceLine = doc->plainKateTextLine(braceCursor.line()); + const int braceFirst = braceLine->firstChar(); + + QString whitespaceToOpenBrace = initialWhitespace( braceLine, bracePos, false ); + + // if the open brace is the start of a namespace, don't indent... + // FIXME: this is an extremely poor heuristic. it looks on the line with + // the { and the line before to see if they start with a keyword + // beginning 'namespace'. that's 99% of usage, I'd guess. + { + if( braceFirst >= 0 && braceLine->attribute(braceFirst) == keywordAttrib && + braceLine->stringAtPos( braceFirst, QString::fromLatin1( "namespace" ) ) ) + return continuationIndent(indentCursor) + whitespaceToOpenBrace; + + if( braceCursor.line() > 0 ) + { + KateTextLine::Ptr prevLine = doc->plainKateTextLine(braceCursor.line() - 1); + int firstPrev = prevLine->firstChar(); + if( firstPrev >= 0 && prevLine->attribute(firstPrev) == keywordAttrib && + prevLine->stringAtPos( firstPrev, QString::fromLatin1( "namespace" ) ) ) + return continuationIndent(indentCursor) + whitespaceToOpenBrace; + } + } + + KateTextLine::Ptr indentLine = doc->plainKateTextLine(indentCursor.line()); + const int indentFirst = indentLine->firstChar(); + + // if the line starts with a close brace, don't indent... + if( indentFirst >= 0 && indentLine->getChar(indentFirst) == '}' ) + return whitespaceToOpenBrace; + + // if : is the first character (and not followed by another :), this is the start + // of an initialization list, or a continuation of a ?:. either way, indent twice. + if ( indentFirst >= 0 && indentLine->attribute(indentFirst) == symbolAttrib && + indentLine->getChar(indentFirst) == ':' && indentLine->getChar(indentFirst+1) != ':' ) + { + return indentString + indentString + whitespaceToOpenBrace; + } + + const bool continuation = inStatement(indentCursor); + // if the current line starts with a label, don't indent... + if( !continuation && startsWithLabel( indentCursor.line() ) ) + return whitespaceToOpenBrace; + + // the normal case: indent once for the brace, again if it's a continuation + QString continuationIndent = continuation ? indentString : QString::null; + return indentString + continuationIndent + whitespaceToOpenBrace; +} + +void KateCSAndSIndent::processChar(QChar c) +{ + // 'n' trigger is for c# regions. + static const QString triggers("}{)]/:;#n"); + if (triggers.find(c) == -1) + return; + + // for historic reasons, processChar doesn't get a cursor + // to work on. so fabricate one. + KateView *view = doc->activeView(); + KateDocCursor begin(view->cursorLine(), 0, doc); + + KateTextLine::Ptr textLine = doc->plainKateTextLine(begin.line()); + if ( c == 'n' ) + { + int first = textLine->firstChar(); + if( first < 0 || textLine->getChar(first) != '#' ) + return; + } + + if ( textLine->attribute( begin.col() ) == doxyCommentAttrib ) + { + // dominik: if line is "* /", change it to "*/" + if ( c == '/' ) + { + int first = textLine->firstChar(); + // if the first char exists and is a '*', and the next non-space-char + // is already the just typed '/', concatenate it to "*/". + if ( first != -1 + && textLine->getChar( first ) == '*' + && textLine->nextNonSpaceChar( first+1 ) == view->cursorColumnReal()-1 ) + doc->removeText( view->cursorLine(), first+1, view->cursorLine(), view->cursorColumnReal()-1); + } + + // anders: don't change the indent of doxygen lines here. + return; + } + + processLine(begin); +} + +//END + +//BEGIN KateVarIndent +class KateVarIndentPrivate { + public: + QRegExp reIndentAfter, reIndent, reUnindent; + QString triggers; + uint couples; + uchar coupleAttrib; +}; + +KateVarIndent::KateVarIndent( KateDocument *doc ) +: KateNormalIndent( doc ) +{ + d = new KateVarIndentPrivate; + d->reIndentAfter = QRegExp( doc->variable( "var-indent-indent-after" ) ); + d->reIndent = QRegExp( doc->variable( "var-indent-indent" ) ); + d->reUnindent = QRegExp( doc->variable( "var-indent-unindent" ) ); + d->triggers = doc->variable( "var-indent-triggerchars" ); + d->coupleAttrib = 0; + + slotVariableChanged( "var-indent-couple-attribute", doc->variable( "var-indent-couple-attribute" ) ); + slotVariableChanged( "var-indent-handle-couples", doc->variable( "var-indent-handle-couples" ) ); + + // update if a setting is changed + connect( doc, SIGNAL(variableChanged( const QString&, const QString&) ), + this, SLOT(slotVariableChanged( const QString&, const QString& )) ); +} + +KateVarIndent::~KateVarIndent() +{ + delete d; +} + +void KateVarIndent::processNewline ( KateDocCursor &begin, bool /*needContinue*/ ) +{ + // process the line left, as well as the one entered + KateDocCursor left( begin.line()-1, 0, doc ); + processLine( left ); + processLine( begin ); +} + +void KateVarIndent::processChar ( QChar c ) +{ + // process line if the c is in our list, and we are not in comment text + if ( d->triggers.contains( c ) ) + { + KateTextLine::Ptr ln = doc->plainKateTextLine( doc->activeView()->cursorLine() ); + if ( ln->attribute( doc->activeView()->cursorColumn()-1 ) == commentAttrib ) + return; + + KateView *view = doc->activeView(); + KateDocCursor begin( view->cursorLine(), 0, doc ); + kdDebug(13030)<<"variable indenter: process char '"<plainKateTextLine( ln ); + if ( ! ktl ) return; // no line!? + + // skip blank lines, except for the cursor line + KateView *v = doc->activeView(); + if ( (ktl->firstChar() < 0) && (!v || (int)v->cursorLine() != ln ) ) + return; + + int fc; + if ( ln > 0 ) + do + { + + ktl = doc->plainKateTextLine( --ln ); + fc = ktl->firstChar(); + if ( ktl->attribute( fc ) != commentAttrib ) + pos = fc; + } + while ( (ln > 0) && (pos < 0) ); // search a not empty text line + + if ( pos < 0 ) + pos = 0; + else + pos = ktl->cursorX( pos, tabWidth ); + + int adjustment = 0; + + // try 'couples' for an opening on the above line first. since we only adjust by 1 unit, + // we only need 1 match. + if ( d->couples & Parens && coupleBalance( ln, '(', ')' ) > 0 ) + adjustment++; + else if ( d->couples & Braces && coupleBalance( ln, '{', '}' ) > 0 ) + adjustment++; + else if ( d->couples & Brackets && coupleBalance( ln, '[', ']' ) > 0 ) + adjustment++; + + // Try 'couples' for a closing on this line first. since we only adjust by 1 unit, + // we only need 1 match. For unindenting, we look for a closing character + // *at the beginning of the line* + // NOTE Assume that a closing brace with the configured attribute on the start + // of the line is closing. + // When acting on processChar, the character isn't highlighted. So I could + // either not check, assuming that the first char *is* meant to close, or do a + // match test if the attrib is 0. How ever, doing that is + // a potentially huge job, if the match is several hundred lines away. + // Currently, the check is done. + { + KateTextLine::Ptr tl = doc->plainKateTextLine( line.line() ); + int i = tl->firstChar(); + if ( i > -1 ) + { + QChar ch = tl->getChar( i ); + uchar at = tl->attribute( i ); + kdDebug(13030)<<"attrib is "<couples & Parens && ch == ')' + && ( at == d->coupleAttrib + || (! at && hasRelevantOpening( KateDocCursor( line.line(), i, doc ) )) + ) + ) + adjustment--; + else if ( d->couples & Braces && ch == '}' + && ( at == d->coupleAttrib + || (! at && hasRelevantOpening( KateDocCursor( line.line(), i, doc ) )) + ) + ) + adjustment--; + else if ( d->couples & Brackets && ch == ']' + && ( at == d->coupleAttrib + || (! at && hasRelevantOpening( KateDocCursor( line.line(), i, doc ) )) + ) + ) + adjustment--; + } + } +#define ISCOMMENTATTR(attr) (attr==commentAttrib||attr==doxyCommentAttrib) +#define ISCOMMENT (ISCOMMENTATTR(ktl->attribute(ktl->firstChar()))||ISCOMMENTATTR(ktl->attribute(matchpos))) + // check if we should indent, unless the line starts with comment text, + // or the match is in comment text + kdDebug(13030)<<"variable indenter: starting indent: "<reIndentAfter.isEmpty() + && (matchpos = d->reIndentAfter.search( doc->textLine( ln ) )) > -1 + && ! ISCOMMENT ) + adjustment++; + + // else, check if this line should indent unless ... + ktl = doc->plainKateTextLine( line.line() ); + if ( ! d->reIndent.isEmpty() + && (matchpos = d->reIndent.search( doc->textLine( line.line() ) )) > -1 + && ! ISCOMMENT ) + adjustment++; + + // else, check if the current line indicates if we should remove indentation unless ... + if ( ! d->reUnindent.isEmpty() + && (matchpos = d->reUnindent.search( doc->textLine( line.line() ) )) > -1 + && ! ISCOMMENT ) + adjustment--; + + kdDebug(13030)<<"variable indenter: adjusting by "< 0 ) + pos += indentWidth; + else if ( adjustment < 0 ) + pos -= indentWidth; + + ln = line.line(); + fc = doc->plainKateTextLine( ln )->firstChar(); + + // dont change if there is no change. + // ### should I actually compare the strings? + // FIXME for some odd reason, the document gets marked as changed + // even if we don't change it !? + if ( fc == pos ) + return; + + if ( fc > 0 ) + doc->removeText (ln, 0, ln, fc ); + + if ( pos > 0 ) + indent = tabString( pos ); + + if ( pos > 0 ) + doc->insertText (ln, 0, indent); + + // try to restore cursor ? + line.setCol( pos ); +} + +void KateVarIndent::processSection (const KateDocCursor &begin, const KateDocCursor &end) +{ + KateDocCursor cur = begin; + while (cur.line() <= end.line()) + { + processLine (cur); + if (!cur.gotoNextLine()) + break; + } +} + +void KateVarIndent::slotVariableChanged( const QString &var, const QString &val ) +{ + if ( ! var.startsWith("var-indent") ) + return; + + if ( var == "var-indent-indent-after" ) + d->reIndentAfter.setPattern( val ); + else if ( var == "var-indent-indent" ) + d->reIndent.setPattern( val ); + else if ( var == "var-indent-unindent" ) + d->reUnindent.setPattern( val ); + else if ( var == "var-indent-triggerchars" ) + d->triggers = val; + else if ( var == "var-indent-handle-couples" ) + { + d->couples = 0; + QStringList l = QStringList::split( " ", val ); + if ( l.contains("parens") ) d->couples |= Parens; + if ( l.contains("braces") ) d->couples |= Braces; + if ( l.contains("brackets") ) d->couples |= Brackets; + } + else if ( var == "var-indent-couple-attribute" ) + { + //read a named attribute of the config. + KateHlItemDataList items; + doc->highlight()->getKateHlItemDataListCopy (0, items); + + for (uint i=0; iname.section( ':', 1 ) == val ) + { + d->coupleAttrib = i; + break; + } + } + } +} + +int KateVarIndent::coupleBalance ( int line, const QChar &open, const QChar &close ) const +{ + int r = 0; + + KateTextLine::Ptr ln = doc->plainKateTextLine( line ); + if ( ! ln || ! ln->length() ) return 0; + + for ( uint z=0; z < ln->length(); z++ ) + { + QChar c = ln->getChar( z ); + if ( ln->attribute(z) == d->coupleAttrib ) + { + kdDebug(13030)<coupleAttrib) + { + QChar ch = cur.currentChar(); + if (ch == opener) + count--; + else if (ch == close) + count++; + + if (count == 0) + return true; + } + } + + return false; +} + + +//END KateVarIndent + +//BEGIN KateScriptIndent +KateScriptIndent::KateScriptIndent( KateDocument *doc ) + : KateNormalIndent( doc ) +{ + m_script=KateFactory::self()->indentScript ("script-indent-c1-test"); +} + +KateScriptIndent::~KateScriptIndent() +{ +} + +void KateScriptIndent::processNewline( KateDocCursor &begin, bool needContinue ) +{ + kdDebug(13030) << "processNewline" << endl; + KateView *view = doc->activeView(); + + if (view) + { + QString errorMsg; + + QTime t; + t.start(); + kdDebug(13030)<<"calling m_script.processChar"<activeView(); + + if (view) + { + QString errorMsg; + + QTime t; + t.start(); + kdDebug(13030)<<"calling m_script.processChar"<activeView(); + + if (view) + { + QString errorMsg; + + QTime t; + t.start(); + kdDebug(13030)<<"calling m_script.processLine"< +ScriptIndentConfigPage::ScriptIndentConfigPage ( QWidget *parent, const char *name ) + : IndenterConfigPage(parent, name) +{ + QLabel* hello = new QLabel("Hello world! Dummy for testing purpose.", this); + hello->show(); +} + +ScriptIndentConfigPage::~ScriptIndentConfigPage () +{ +} + +void ScriptIndentConfigPage::apply () +{ + kdDebug(13030) << "ScriptIndentConfigPagE::apply() was called, save config options now!" << endl; +} +//END ScriptIndentConfigPage + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/kateautoindent.h b/kate/part/kateautoindent.h new file mode 100644 index 000000000..76ba14ee6 --- /dev/null +++ b/kate/part/kateautoindent.h @@ -0,0 +1,581 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Jesse Yurkovich + Copyright (C) 2004 >Anders Lund (KateVarIndent class) + Copyright (C) 2005 Dominik Haumann (basic support for config page) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __KATE_AUTO_INDENT_H__ +#define __KATE_AUTO_INDENT_H__ + +#include + +#include "katecursor.h" +#include "kateconfig.h" +#include "katejscript.h" +class KateDocument; + +/** + * This widget will be embedded into a modal dialog when clicking + * the "Configure..." button in the indentation config page. + * To add a config page for an indenter there are several todos: + * - Derive a class from this class. This widget will be embedded into + * the config dialog. + * - Override the slot @p apply(), which is called when the configuration + * needs to be saved. + * - Override @p KateAutoIndent::configPage() to return an instance of + * this dialog. + * - Return @p true in @p KateAutoIndent::hasConfigPage() for the + * corresponding indenter id. + */ +class IndenterConfigPage : public QWidget +{ + Q_OBJECT + + public: + /** + * Standard constructor + * @param parent parent widget + * @param name name + */ + IndenterConfigPage ( QWidget *parent=0, const char *name=0 ) : QWidget(parent, name) {} + virtual ~IndenterConfigPage () {} + + public slots: + /** + * Apply the changes. Save options here, use @p kapp->config() and + * group [Kate Indenter MyIndenter]. + */ + virtual void apply () = 0; +}; + +/** + * Provides Auto-Indent functionality for katepart. + * This baseclass is a real dummy, does nothing beside remembering the document it belongs too, + * only to have the object around + */ +class KateAutoIndent : public QObject +{ + Q_OBJECT + + /** + * Static methods to create and list indention modes + */ + public: + /** + * Create an indenter + * @param doc document for the indenter + * @param mode indention mode wanted + * @return created autoindention object + */ + static KateAutoIndent *createIndenter (KateDocument *doc, uint mode); + + /** + * List all possible modes by name + * @return list of modes + */ + static QStringList listModes (); + + /** + * Return the mode name given the mode + * @param mode mode index + * @return name for this mode index + */ + static QString modeName (uint mode); + + /** + * Return the mode description + * @param mode mode index + * @return mode index + */ + static QString modeDescription (uint mode); + + /** + * Maps name -> index + * @param name mode name + * @return mode index + */ + static uint modeNumber (const QString &name); + + /** + * Config page support + * @param mode mode index + * @return true, if the indenter @p mode has a configuration page + */ + static bool hasConfigPage (uint mode); + + /** + * Support for a config page. + * @return config page or 0 if not available. + */ + static IndenterConfigPage* configPage(QWidget *parent, uint mode); + + public: + /** + * Constructor + * @param doc parent document + */ + KateAutoIndent (KateDocument *doc); + + /** + * Virtual Destructor for the baseclass + */ + virtual ~KateAutoIndent (); + + public slots: + /** + * Update indenter's configuration (indention width, attributes etc.) + */ + virtual void updateConfig () {}; + + public: + /** + * does this indenter support processNewLine + * @return can you do it? + */ + virtual bool canProcessNewLine () const { return false; } + + /** + * Called every time a newline character is inserted in the document. + * + * @param cur The position to start processing. Contains the new cursor position after the indention. + * @param needContinue Used to determine whether to calculate a continue indent or not. + */ + virtual void processNewline (KateDocCursor &cur, bool needContinue) { Q_UNUSED(cur); Q_UNUSED(needContinue); } + + /** + * Called every time a character is inserted into the document. + * @param c character inserted + */ + virtual void processChar (QChar c) { Q_UNUSED(c); } + + /** + * Aligns/indents the given line to the proper indent position. + */ + virtual void processLine (KateDocCursor &/*line*/) { } + + /** + * Processes a section of text, indenting each line in between. + */ + virtual void processSection (const KateDocCursor &/*begin*/, const KateDocCursor &/*end*/) { } + + /** + * Set to true if an actual implementation of 'processLine' is present. + * This is used to prevent a needless Undo action from being created. + */ + virtual bool canProcessLine() const { return false; } + + /** + * Mode index of this mode + * @return modeNumber + */ + virtual uint modeNumber () const { return KateDocumentConfig::imNone; }; + + protected: + KateDocument *doc; +}; + +/** + * This action provides a list of available indenters and gets plugged + * into the KateView's KActionCollection. + */ +class KateViewIndentationAction : public KActionMenu +{ + Q_OBJECT + + public: + KateViewIndentationAction(KateDocument *_doc, const QString& text, QObject* parent = 0, const char* name = 0); + + ~KateViewIndentationAction(){;}; + + private: + KateDocument* doc; + + public slots: + void slotAboutToShow(); + + private slots: + void setMode (int mode); +}; + +/** + * Provides Auto-Indent functionality for katepart. + */ +class KateNormalIndent : public KateAutoIndent +{ + Q_OBJECT + +public: + /** + * Constructor + * @param doc parent document + */ + KateNormalIndent (KateDocument *doc); + + /** + * Virtual Destructor for the baseclass + */ + virtual ~KateNormalIndent (); + +public slots: + /** + * Update indenter's configuration (indention width, attributes etc.) + */ + virtual void updateConfig (); + +public: + /** + * does this indenter support processNewLine + * @return can you do it? + */ + virtual bool canProcessNewLine () const { return true; } + + /** + * Called every time a newline character is inserted in the document. + * + * @param cur The position to start processing. Contains the new cursor position after the indention. + * @param needContinue Used to determine whether to calculate a continue indent or not. + */ + virtual void processNewline (KateDocCursor &cur, bool needContinue); + + /** + * Called every time a character is inserted into the document. + * @param c character inserted + */ + virtual void processChar (QChar c) { Q_UNUSED(c); } + + /** + * Aligns/indents the given line to the proper indent position. + */ + virtual void processLine (KateDocCursor &/*line*/) { } + + /** + * Processes a section of text, indenting each line in between. + */ + virtual void processSection (const KateDocCursor &/*begin*/, const KateDocCursor &/*end*/) { } + + /** + * Set to true if an actual implementation of 'processLine' is present. + * This is used to prevent a needless Undo action from being created. + */ + virtual bool canProcessLine() const { return false; } + + /** + * Mode index of this mode + * @return modeNumber + */ + virtual uint modeNumber () const { return KateDocumentConfig::imNormal; }; + +protected: + + /** + * Determines if the characters open and close are balanced between @p begin and @p end + * Fills in @p pos with the column position of first opened character if found. + * + * @param begin Beginning cursor position. + * @param end Ending cursor position where the processing will stop. + * @param open The open character. + * @param close The closing character which should be matched against @p open. + * @param pos Contains the position of the first @p open character in the line. + * @return True if @p open and @p close have an equal number of occurances between @p begin and @p end. False otherwise. + */ + bool isBalanced (KateDocCursor &begin, const KateDocCursor &end, QChar open, QChar close, uint &pos) const; + + /** + * Skip all whitespace starting at @p cur and ending at @p max. Spans lines if @p newline is set. + * @p cur is set to the current position afterwards. + * + * @param cur The current cursor position to start from. + * @param max The furthest cursor position that will be used for processing + * @param newline Whether we are allowed to span multiple lines when skipping blanks + * @return True if @p cur < @p max after processing. False otherwise. + */ + bool skipBlanks (KateDocCursor &cur, KateDocCursor &max, bool newline) const; + + /** + * Measures the indention of the current textline marked by cur + * @param cur The cursor position to measure the indent to. + * @return The length of the indention in characters. + */ + uint measureIndent (KateDocCursor &cur) const; + + /** + * Produces a string with the proper indentation characters for its length. + * + * @param length The length of the indention in characters. + * @return A QString representing @p length characters (factoring in tabs and spaces) + */ + QString tabString(uint length) const; + + uint tabWidth; //!< The number of characters simulated for a tab + uint indentWidth; //!< The number of characters used when tabs are replaced by spaces + +public: + // Attributes that we should skip over or otherwise know about + uchar commentAttrib; + uchar doxyCommentAttrib; + uchar regionAttrib; + uchar symbolAttrib; + uchar alertAttrib; + uchar tagAttrib; + uchar wordAttrib; + uchar keywordAttrib; + uchar normalAttrib; + uchar extensionAttrib; + uchar preprocessorAttrib; + uchar stringAttrib; + uchar charAttrib; + +protected: + bool useSpaces; //!< Should we use spaces or tabs to indent + bool mixedIndent; //!< Optimize indent by mixing spaces and tabs, ala emacs + bool keepProfile; //!< Always try to honor the leading whitespace of lines already in the file +}; + +class KateCSmartIndent : public KateNormalIndent +{ + Q_OBJECT + + public: + KateCSmartIndent (KateDocument *doc); + ~KateCSmartIndent (); + + virtual void processNewline (KateDocCursor &cur, bool needContinue); + virtual void processChar (QChar c); + + virtual void processLine (KateDocCursor &line); + virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end); + + virtual bool canProcessLine() const { return true; } + + virtual uint modeNumber () const { return KateDocumentConfig::imCStyle; }; + + private: + uint calcIndent (KateDocCursor &begin, bool needContinue); + uint calcContinue (KateDocCursor &begin, KateDocCursor &end); + uint findOpeningBrace (KateDocCursor &start); + uint findOpeningParen (KateDocCursor &start); + uint findOpeningComment (KateDocCursor &start); + bool firstOpeningBrace (KateDocCursor &start); + bool handleDoxygen (KateDocCursor &begin); + + bool allowSemi; + bool processingBlock; +}; + +class KatePythonIndent : public KateNormalIndent +{ + Q_OBJECT + + public: + KatePythonIndent (KateDocument *doc); + ~KatePythonIndent (); + + virtual void processNewline (KateDocCursor &cur, bool needContinue); + + virtual uint modeNumber () const { return KateDocumentConfig::imPythonStyle; }; + + private: + int calcExtra (int &prevBlock, int &pos, KateDocCursor &end); + void traverseString( const QChar &stringChar, KateDocCursor &cur, KateDocCursor &end ); + + static QRegExp endWithColon; + static QRegExp stopStmt; + static QRegExp blockBegin; +}; + +class KateXmlIndent : public KateNormalIndent +{ + Q_OBJECT + + public: + KateXmlIndent (KateDocument *doc); + ~KateXmlIndent (); + + virtual uint modeNumber () const { return KateDocumentConfig::imXmlStyle; } + virtual void processNewline (KateDocCursor &cur, bool needContinue); + virtual void processChar (QChar c); + virtual void processLine (KateDocCursor &line); + virtual bool canProcessLine() const { return true; } + virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end); + + private: + // sets the indentation of a single line based on previous line + // (returns indentation width) + uint processLine (uint line); + + // gets information about a line + void getLineInfo (uint line, uint &prevIndent, int &numTags, + uint &attrCol, bool &unclosedTag); + + // useful regular expressions + static const QRegExp startsWithCloseTag; + static const QRegExp unclosedDoctype; +}; + +class KateCSAndSIndent : public KateNormalIndent +{ + Q_OBJECT + + public: + KateCSAndSIndent (KateDocument *doc); + ~KateCSAndSIndent (); + + virtual void processNewline (KateDocCursor &begin, bool needContinue); + virtual void processChar (QChar c); + + virtual void processLine (KateDocCursor &line); + virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end); + + virtual bool canProcessLine() const { return true; } + + virtual uint modeNumber () const { return KateDocumentConfig::imCSAndS; }; + + private: + void updateIndentString(); + + bool inForStatement( int line ); + int lastNonCommentChar( const KateDocCursor &line ); + bool startsWithLabel( int line ); + bool inStatement( const KateDocCursor &begin ); + QString continuationIndent( const KateDocCursor &begin ); + + QString calcIndent (const KateDocCursor &begin); + QString calcIndentAfterKeyword(const KateDocCursor &indentCursor, const KateDocCursor &keywordCursor, int keywordPos, bool blockKeyword); + QString calcIndentInBracket(const KateDocCursor &indentCursor, const KateDocCursor &bracketCursor, int bracketPos); + QString calcIndentInBrace(const KateDocCursor &indentCursor, const KateDocCursor &braceCursor, int bracePos); + + bool handleDoxygen (KateDocCursor &begin); + QString findOpeningCommentIndentation (const KateDocCursor &start); + + QString indentString; +}; + +/** + * This indenter uses document variables to determine when to add/remove indents. + * + * It attempts to get the following variables from the document: + * - var-indent-indent-after: A rerular expression which will cause a line to + * be indented by one unit, if the first non-whitespace-only line above matches. + * - var-indent-indent: A regular expression, which will cause a matching line + * to be indented by one unit. + * - var-indent-unindent: A regular expression which will cause the line to be + * unindented by one unit if matching. + * - var-indent-triggerchars: a list of characters that should cause the + * indentiou to be recalculated immediately when typed. + * - var-indent-handle-couples: a list of paren sets to handle. Any combination + * of 'parens' 'braces' and 'brackets'. Each set type is handled + * the following way: If there are unmatched opening instances on the above line, + * one indent unit is added, if there are unmatched closing instances on the + * current line, one indent unit is removed. + * - var-indent-couple-attribute: When looking for unmatched couple openings/closings, + * only characters with this attribute is considered. The value must be the + * attribute name from the syntax xml file, for example "Symbol". If it's not + * specified, attribute 0 is used (usually 'Normal Text'). + * + * The idea is to provide a somewhat intelligent indentation for perl, php, + * bash, scheme and in general formats with humble indentation needs. + */ +class KateVarIndent : public KateNormalIndent +{ + Q_OBJECT + + public: + /** + * Purely for readability, couples we know and love + */ + enum pairs { + Parens=1, + Braces=2, + Brackets=4, + AngleBrackets=8 + }; + + KateVarIndent( KateDocument *doc ); + virtual ~KateVarIndent(); + + virtual void processNewline (KateDocCursor &cur, bool needContinue); + virtual void processChar (QChar c); + + virtual void processLine (KateDocCursor &line); + virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end); + + virtual bool canProcessLine() const { return true; } + + virtual uint modeNumber () const { return KateDocumentConfig::imVarIndent; }; + + private slots: + void slotVariableChanged(const QString&, const QString&); + + private: + /** + * Check if coupled characters are in balance within one line. + * @param line the line to check + * @param open the opening character + * @param close the closing character + * @param attrib the attribute the characters must have, defaults to + * KateAutoIndent::symbolAttrib + */ + int coupleBalance( int line, const QChar &open, const QChar &close ) const; + + /** + * @return true if there is a matching opening with the correct attribute + * @param end a cursor pointing to the closing character + */ + bool hasRelevantOpening( const KateDocCursor &end ) const; + + class KateVarIndentPrivate *d; +}; + +class KateScriptIndent : public KateNormalIndent +{ + Q_OBJECT + + public: + KateScriptIndent( KateDocument *doc ); + ~KateScriptIndent(); + + virtual void processNewline( KateDocCursor &cur, bool needContinue ); + virtual void processChar( QChar c ); + + virtual void processLine (KateDocCursor &line); +// virtual void processSection (const KateDocCursor &begin, const KateDocCursor &end); + + virtual bool canProcessLine() const { return true; } + + virtual uint modeNumber () const { return KateDocumentConfig::imScriptIndent; }; + private: + KateIndentScript m_script; +}; + +class ScriptIndentConfigPage : public IndenterConfigPage +{ + Q_OBJECT + + public: + ScriptIndentConfigPage ( QWidget *parent=0, const char *name=0 ); + virtual ~ScriptIndentConfigPage (); + + public slots: + /** + * Apply changes. + */ + virtual void apply (); +}; + +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katebookmarks.cpp b/kate/part/katebookmarks.cpp new file mode 100644 index 000000000..f92fb4282 --- /dev/null +++ b/kate/part/katebookmarks.cpp @@ -0,0 +1,287 @@ +/* This file is part of the KDE libraries + Copyright (C) 2002, 2003, 2004 Anders Lund + Copyright (C) 2002 John Firebaugh + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "katebookmarks.h" +#include "katebookmarks.moc" + +#include "katedocument.h" +#include "kateview.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +/** + Utility: selection sort + sort a QMemArray in ascending order. + max it the largest (zerobased) index to sort. + To sort the entire array: ssort( *array, array.size() -1 ); + This is only efficient if ran only once. +*/ +static void ssort( QMemArray &a, int max ) +{ + uint tmp, j, maxpos; + for ( uint h = max; h >= 1; h-- ) + { + maxpos = 0; + for ( j = 0; j <= h; j++ ) + maxpos = a[j] > a[maxpos] ? j : maxpos; + tmp = a[maxpos]; + a[maxpos] = a[h]; + a[h] = tmp; + } +} + +// TODO add a insort() or bubble_sort - more efficient for aboutToShow() ? + +KateBookmarks::KateBookmarks( KateView* view, Sorting sort ) + : QObject( view, "kate bookmarks" ) + , m_view( view ) + , m_sorting( sort ) +{ + connect (view->getDoc(), SIGNAL(marksChanged()), this, SLOT(marksChanged())); + _tries=0; + m_bookmarksMenu = 0L; +} + +KateBookmarks::~KateBookmarks() +{ +} + +void KateBookmarks::createActions( KActionCollection* ac ) +{ + m_bookmarkToggle = new KToggleAction( + i18n("Set &Bookmark"), "bookmark", CTRL+Key_B, + this, SLOT(toggleBookmark()), + ac, "bookmarks_toggle" ); + m_bookmarkToggle->setWhatsThis(i18n("If a line has no bookmark then add one, otherwise remove it.")); + m_bookmarkToggle->setCheckedState( i18n("Clear &Bookmark") ); + + m_bookmarkClear = new KAction( + i18n("Clear &All Bookmarks"), 0, + this, SLOT(clearBookmarks()), + ac, "bookmarks_clear"); + m_bookmarkClear->setWhatsThis(i18n("Remove all bookmarks of the current document.")); + + m_goNext = new KAction( + i18n("Next Bookmark"), "next", ALT + Key_PageDown, + this, SLOT(goNext()), + ac, "bookmarks_next"); + m_goNext->setWhatsThis(i18n("Go to the next bookmark.")); + + m_goPrevious = new KAction( + i18n("Previous Bookmark"), "previous", ALT + Key_PageUp, + this, SLOT(goPrevious()), + ac, "bookmarks_previous"); + m_goPrevious->setWhatsThis(i18n("Go to the previous bookmark.")); + + m_bookmarksMenu = (new KActionMenu(i18n("&Bookmarks"), ac, "bookmarks"))->popupMenu(); + + //connect the aboutToShow() and aboutToHide() signals with + //the bookmarkMenuAboutToShow() and bookmarkMenuAboutToHide() slots + connect( m_bookmarksMenu, SIGNAL(aboutToShow()), this, SLOT(bookmarkMenuAboutToShow())); + connect( m_bookmarksMenu, SIGNAL(aboutToHide()), this, SLOT(bookmarkMenuAboutToHide()) ); + + marksChanged (); + bookmarkMenuAboutToHide(); + + connect( m_view, SIGNAL( gotFocus( Kate::View * ) ), this, SLOT( slotViewGotFocus( Kate::View * ) ) ); + connect( m_view, SIGNAL( lostFocus( Kate::View * ) ), this, SLOT( slotViewLostFocus( Kate::View * ) ) ); +} + +void KateBookmarks::toggleBookmark () +{ + uint mark = m_view->getDoc()->mark( m_view->cursorLine() ); + if( mark & KTextEditor::MarkInterface::markType01 ) + m_view->getDoc()->removeMark( m_view->cursorLine(), + KTextEditor::MarkInterface::markType01 ); + else + m_view->getDoc()->addMark( m_view->cursorLine(), + KTextEditor::MarkInterface::markType01 ); +} + +void KateBookmarks::clearBookmarks () +{ + + QPtrList m = m_view->getDoc()->marks(); + for (uint i=0; i < m.count(); i++) + m_view->getDoc()->removeMark( m.at(i)->line, KTextEditor::MarkInterface::markType01 ); + + // just to be sure ;) + marksChanged (); +} + +void KateBookmarks::slotViewGotFocus( Kate::View *v ) +{ + if ( v == (Kate::View*)m_view ) + bookmarkMenuAboutToHide(); +} + +void KateBookmarks::slotViewLostFocus( Kate::View *v ) +{ + if ( v == (Kate::View*)m_view ) + m_bookmarksMenu->clear(); +} + +void KateBookmarks::insertBookmarks( QPopupMenu& menu ) +{ + uint line = m_view->cursorLine(); + const QRegExp re("&(?!&)"); + int idx( -1 ); + int old_menu_count = menu.count(); + KTextEditor::Mark *next = 0; + KTextEditor::Mark *prev = 0; + + QPtrList m = m_view->getDoc()->marks(); + QMemArray sortArray( m.count() ); + QPtrListIterator it( m ); + + if ( it.count() > 0 ) + menu.insertSeparator(); + + for( int i = 0; *it; ++it, ++i ) + { + if( (*it)->type & KTextEditor::MarkInterface::markType01 ) + { + QString bText = KStringHandler::rEmSqueeze + ( m_view->getDoc()->textLine( (*it)->line ), + menu.fontMetrics(), 32 ); + bText.replace(re, "&&"); // kill undesired accellerators! + bText.replace('\t', ' '); // kill tabs, as they are interpreted as shortcuts + + if ( m_sorting == Position ) + { + sortArray[i] = (*it)->line; + ssort( sortArray, i ); + idx = sortArray.find( (*it)->line ) + 3; + } + + menu.insertItem( + QString("%1 - \"%2\"").arg( (*it)->line+1 ).arg( bText ), + m_view, SLOT(gotoLineNumber(int)), 0, (*it)->line, idx ); + + if ( (*it)->line < line ) + { + if ( ! prev || prev->line < (*it)->line ) + prev = (*it); + } + + else if ( (*it)->line > line ) + { + if ( ! next || next->line > (*it)->line ) + next = (*it); + } + } + } + + idx = ++old_menu_count; + if ( next ) + { + m_goNext->setText( i18n("&Next: %1 - \"%2\"").arg( next->line + 1 ) + .arg( KStringHandler::rsqueeze( m_view->getDoc()->textLine( next->line ), 24 ) ) ); + m_goNext->plug( &menu, idx ); + idx++; + } + if ( prev ) + { + m_goPrevious->setText( i18n("&Previous: %1 - \"%2\"").arg(prev->line + 1 ) + .arg( KStringHandler::rsqueeze( m_view->getDoc()->textLine( prev->line ), 24 ) ) ); + m_goPrevious->plug( &menu, idx ); + idx++; + } + if ( next || prev ) + menu.insertSeparator( idx ); + +} + +void KateBookmarks::bookmarkMenuAboutToShow() +{ + + QPtrList m = m_view->getDoc()->marks(); + + m_bookmarksMenu->clear(); + m_bookmarkToggle->setChecked( m_view->getDoc()->mark( m_view->cursorLine() ) + & KTextEditor::MarkInterface::markType01 ); + m_bookmarkToggle->plug( m_bookmarksMenu ); + m_bookmarkClear->plug( m_bookmarksMenu ); + + + insertBookmarks(*m_bookmarksMenu); +} + +/* + Make sure next/prev actions are plugged, and have a clean text +*/ +void KateBookmarks::bookmarkMenuAboutToHide() +{ + m_bookmarkToggle->plug( m_bookmarksMenu ); + m_bookmarkClear->plug( m_bookmarksMenu ); + m_goNext->setText( i18n("Next Bookmark") ); + m_goNext->plug( m_bookmarksMenu ); + m_goPrevious->setText( i18n("Previous Bookmark") ); + m_goPrevious->plug( m_bookmarksMenu ); +} + +void KateBookmarks::goNext() +{ + QPtrList m = m_view->getDoc()->marks(); + if (m.isEmpty()) + return; + + uint line = m_view->cursorLine(); + int found = -1; + + for (uint z=0; z < m.count(); z++) + if ( (m.at(z)->line > line) && ((found == -1) || (uint(found) > m.at(z)->line)) ) + found = m.at(z)->line; + + if (found != -1) + m_view->gotoLineNumber ( found ); +} + +void KateBookmarks::goPrevious() +{ + QPtrList m = m_view->getDoc()->marks(); + if (m.isEmpty()) + return; + + uint line = m_view->cursorLine(); + int found = -1; + + for (uint z=0; z < m.count(); z++) + if ((m.at(z)->line < line) && ((found == -1) || (uint(found) < m.at(z)->line))) + found = m.at(z)->line; + + if (found != -1) + m_view->gotoLineNumber ( found ); +} + +void KateBookmarks::marksChanged () +{ + m_bookmarkClear->setEnabled( !m_view->getDoc()->marks().isEmpty() ); +} + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katebookmarks.h b/kate/part/katebookmarks.h new file mode 100644 index 000000000..0d72c0ccc --- /dev/null +++ b/kate/part/katebookmarks.h @@ -0,0 +1,86 @@ +/* This file is part of the KDE libraries + Copyright (C) 2002, 2003 Anders Lund + Copyright (C) 2002 John Firebaugh + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __KATE_BOOKMARKS_H__ +#define __KATE_BOOKMARKS_H__ + +#include +#include + +class KateView; + +namespace KTextEditor { class Mark; } + +namespace Kate { class View; } + +class KAction; +class KToggleAction; +class KActionCollection; +class QPopupMenu; +class QMenuData; + +class KateBookmarks : public QObject +{ + Q_OBJECT + + public: + enum Sorting { Position, Creation }; + KateBookmarks( KateView* parent, Sorting sort=Position ); + virtual ~KateBookmarks(); + + void createActions( KActionCollection* ); + + KateBookmarks::Sorting sorting() { return m_sorting; }; + void setSorting( Sorting s ) { m_sorting = s; }; + + protected: + void insertBookmarks( QPopupMenu& menu); + + private slots: + void toggleBookmark(); + void clearBookmarks(); + + void slotViewGotFocus( Kate::View * ); + void slotViewLostFocus( Kate::View * ); + + void bookmarkMenuAboutToShow(); + void bookmarkMenuAboutToHide(); + + void goNext(); + void goPrevious(); + + void marksChanged (); + + private: + KateView* m_view; + KToggleAction* m_bookmarkToggle; + KAction* m_bookmarkClear; + KAction* m_goNext; + KAction* m_goPrevious; + + Sorting m_sorting; + QPopupMenu* m_bookmarksMenu; + + uint _tries; +}; + +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; +// vim: noet ts=2 diff --git a/kate/part/katebuffer.cpp b/kate/part/katebuffer.cpp new file mode 100644 index 000000000..06c919f96 --- /dev/null +++ b/kate/part/katebuffer.cpp @@ -0,0 +1,1660 @@ +/* This file is part of the KDE libraries + Copyright (c) 2000 Waldo Bastian + Copyright (C) 2002-2004 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include + +#include "katebuffer.h" +#include "katebuffer.moc" + +#include "katedocument.h" +#include "katehighlight.h" +#include "kateconfig.h" +#include "katefactory.h" +#include "kateautoindent.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/** + * loader block size, load 256 kb at once per default + * if file size is smaller, fall back to file size + */ +static const Q_ULONG KATE_FILE_LOADER_BS = 256 * 1024; + +/** + * KATE_AVG_BLOCK_SIZE is in characters ! + * (internaly we calc with approx 80 chars per line !) + * block will max contain around BLOCK_SIZE chars or + * BLOCK_LINES lines (after load, later that won't be tracked) + */ +static const Q_ULONG KATE_AVG_BLOCK_SIZE = 2048 * 80; +static const Q_ULONG KATE_MAX_BLOCK_LINES = 2048; + +/** + * hl will look at the next KATE_HL_LOOKAHEAD lines + * or until the current block ends if a line is requested + * will avoid to run doHighlight too often + */ +static const uint KATE_HL_LOOKAHEAD = 64; + +/** + * KATE_MAX_BLOCKS_LOADED should be at least 4, as some + * methodes will cause heavy trashing, if not at least the + * latest 2-3 used blocks are alive + */ +uint KateBuffer::m_maxLoadedBlocks = 16; + +/** + * Initial value for m_maxDynamicContexts + */ +static const uint KATE_MAX_DYNAMIC_CONTEXTS = 512; + +void KateBuffer::setMaxLoadedBlocks (uint count) +{ + m_maxLoadedBlocks = kMax (4U, count); +} + +class KateFileLoader +{ + public: + KateFileLoader (const QString &filename, QTextCodec *codec, bool removeTrailingSpaces) + : m_file (filename) + , m_buffer (kMin (m_file.size(), KATE_FILE_LOADER_BS)) + , m_codec (codec) + , m_decoder (m_codec->makeDecoder()) + , m_position (0) + , m_lastLineStart (0) + , m_eof (false) // default to not eof + , lastWasEndOfLine (true) // at start of file, we had a virtual newline + , lastWasR (false) // we have not found a \r as last char + , m_eol (-1) // no eol type detected atm + , m_twoByteEncoding (QString(codec->name()) == "ISO-10646-UCS-2") + , m_binary (false) + , m_removeTrailingSpaces (removeTrailingSpaces) + { + kdDebug (13020) << "OPEN USES ENCODING: " << m_codec->name() << endl; + } + + ~KateFileLoader () + { + delete m_decoder; + } + + /** + * open file, read first chunk of data, detect eol + */ + bool open () + { + if (m_file.open (IO_ReadOnly)) + { + int c = m_file.readBlock (m_buffer.data(), m_buffer.size()); + + if (c > 0) + { + // fix utf16 LE, stolen from khtml ;) + if ((c >= 2) && (m_codec->mibEnum() == 1000) && (m_buffer[1] == 0x00)) + { + // utf16LE, we need to put the decoder in LE mode + char reverseUtf16[3] = {0xFF, 0xFE, 0x00}; + m_decoder->toUnicode(reverseUtf16, 2); + } + + processNull (c); + m_text = m_decoder->toUnicode (m_buffer, c); + } + + m_eof = (c == -1) || (c == 0) || (m_text.length() == 0) || m_file.atEnd(); + + for (uint i=0; i < m_text.length(); i++) + { + if (m_text[i] == '\n') + { + m_eol = KateDocumentConfig::eolUnix; + break; + } + else if ((m_text[i] == '\r')) + { + if (((i+1) < m_text.length()) && (m_text[i+1] == '\n')) + { + m_eol = KateDocumentConfig::eolDos; + break; + } + else + { + m_eol = KateDocumentConfig::eolMac; + break; + } + } + } + + return true; + } + + return false; + } + + // no new lines around ? + inline bool eof () const { return m_eof && !lastWasEndOfLine && (m_lastLineStart == m_text.length()); } + + // eol mode ? autodetected on open(), -1 for no eol found in the first block! + inline int eol () const { return m_eol; } + + // binary ? + inline bool binary () const { return m_binary; } + + // should spaces be ignored at end of line? + inline bool removeTrailingSpaces () const { return m_removeTrailingSpaces; } + + // internal unicode data array + inline const QChar *unicode () const { return m_text.unicode(); } + + // read a line, return length + offset in unicode data + void readLine (uint &offset, uint &length) + { + length = 0; + offset = 0; + + while (m_position <= m_text.length()) + { + if (m_position == m_text.length()) + { + // try to load more text if something is around + if (!m_eof) + { + int c = m_file.readBlock (m_buffer.data(), m_buffer.size()); + + uint readString = 0; + if (c > 0) + { + processNull (c); + + QString str (m_decoder->toUnicode (m_buffer, c)); + readString = str.length(); + + m_text = m_text.mid (m_lastLineStart, m_position-m_lastLineStart) + + str; + } + else + m_text = m_text.mid (m_lastLineStart, m_position-m_lastLineStart); + + // is file completly read ? + m_eof = (c == -1) || (c == 0) || (readString == 0) || m_file.atEnd(); + + // recalc current pos and last pos + m_position -= m_lastLineStart; + m_lastLineStart = 0; + } + + // oh oh, end of file, escape ! + if (m_eof && (m_position == m_text.length())) + { + lastWasEndOfLine = false; + + // line data + offset = m_lastLineStart; + length = m_position-m_lastLineStart; + + m_lastLineStart = m_position; + + return; + } + } + + if (m_text[m_position] == '\n') + { + lastWasEndOfLine = true; + + if (lastWasR) + { + m_lastLineStart++; + lastWasR = false; + } + else + { + // line data + offset = m_lastLineStart; + length = m_position-m_lastLineStart; + + m_lastLineStart = m_position+1; + m_position++; + + return; + } + } + else if (m_text[m_position] == '\r') + { + lastWasEndOfLine = true; + lastWasR = true; + + // line data + offset = m_lastLineStart; + length = m_position-m_lastLineStart; + + m_lastLineStart = m_position+1; + m_position++; + + return; + } + else + { + lastWasEndOfLine = false; + lastWasR = false; + } + + m_position++; + } + } + + // this nice methode will kill all 0 bytes (or double bytes) + // and remember if this was a binary or not ;) + void processNull (uint length) + { + if (m_twoByteEncoding) + { + for (uint i=1; i < length; i+=2) + { + if ((m_buffer[i] == 0) && (m_buffer[i-1] == 0)) + { + m_binary = true; + m_buffer[i] = ' '; + } + } + } + else + { + for (uint i=0; i < length; i++) + { + if (m_buffer[i] == 0) + { + m_binary = true; + m_buffer[i] = ' '; + } + } + } + } + + private: + QFile m_file; + QByteArray m_buffer; + QTextCodec *m_codec; + QTextDecoder *m_decoder; + QString m_text; + uint m_position; + uint m_lastLineStart; + bool m_eof; + bool lastWasEndOfLine; + bool lastWasR; + int m_eol; + bool m_twoByteEncoding; + bool m_binary; + bool m_removeTrailingSpaces; +}; + +/** + * Create an empty buffer. (with one block with one empty line) + */ +KateBuffer::KateBuffer(KateDocument *doc) + : QObject (doc), + editSessionNumber (0), + editIsRunning (false), + editTagLineStart (0xffffffff), + editTagLineEnd (0), + editTagLineFrom (false), + editChangesDone (false), + m_doc (doc), + m_lines (0), + m_lastInSyncBlock (0), + m_lastFoundBlock (0), + m_cacheReadError(false), + m_cacheWriteError(false), + m_loadingBorked (false), + m_binary (false), + m_highlight (0), + m_regionTree (this), + m_tabWidth (8), + m_lineHighlightedMax (0), + m_lineHighlighted (0), + m_maxDynamicContexts (KATE_MAX_DYNAMIC_CONTEXTS) +{ + clear(); +} + +/** + * Cleanup on destruction + */ +KateBuffer::~KateBuffer() +{ + // DELETE ALL BLOCKS, will free mem + for (uint i=0; i < m_blocks.size(); i++) + delete m_blocks[i]; + + // release HL + if (m_highlight) + m_highlight->release(); +} + +void KateBuffer::editStart () +{ + editSessionNumber++; + + if (editSessionNumber > 1) + return; + + editIsRunning = true; + + editTagLineStart = 0xffffffff; + editTagLineEnd = 0; + editTagLineFrom = false; + + editChangesDone = false; +} + +void KateBuffer::editEnd () +{ + if (editSessionNumber == 0) + return; + + editSessionNumber--; + + if (editSessionNumber > 0) + return; + + if (editChangesDone) + { + // hl update !!! + if ( m_highlight && !m_highlight->noHighlighting() + && (editTagLineStart <= editTagLineEnd) + && (editTagLineEnd <= m_lineHighlighted)) + { + // look one line too far, needed for linecontinue stuff + editTagLineEnd++; + + // look one line before, needed nearly 100% only for indentation based folding ! + if (editTagLineStart > 0) + editTagLineStart--; + + KateBufBlock *buf2 = 0; + bool needContinue = false; + while ((buf2 = findBlock(editTagLineStart))) + { + needContinue = doHighlight (buf2, + (editTagLineStart > buf2->startLine()) ? editTagLineStart : buf2->startLine(), + (editTagLineEnd > buf2->endLine()) ? buf2->endLine() : editTagLineEnd, + true); + + editTagLineStart = (editTagLineEnd > buf2->endLine()) ? buf2->endLine() : editTagLineEnd; + + if ((editTagLineStart >= m_lines) || (editTagLineStart >= editTagLineEnd)) + break; + } + + if (needContinue) + m_lineHighlighted = editTagLineStart; + + if (editTagLineStart > m_lineHighlightedMax) + m_lineHighlightedMax = editTagLineStart; + } + else if (editTagLineStart < m_lineHighlightedMax) + m_lineHighlightedMax = editTagLineStart; + } + + editIsRunning = false; +} + +void KateBuffer::clear() +{ + m_regionTree.clear(); + + // cleanup the blocks + for (uint i=0; i < m_blocks.size(); i++) + delete m_blocks[i]; + + m_blocks.clear (); + + // create a bufblock with one line, we need that, only in openFile we won't have that + KateBufBlock *block = new KateBufBlock(this, 0, 0); + m_blocks.append (block); + + // reset the state + m_lines = block->lines(); + m_lastInSyncBlock = 0; + m_lastFoundBlock = 0; + m_cacheWriteError = false; + m_cacheReadError = false; + m_loadingBorked = false; + m_binary = false; + + m_lineHighlightedMax = 0; + m_lineHighlighted = 0; +} + +bool KateBuffer::openFile (const QString &m_file) +{ + KateFileLoader file (m_file, m_doc->config()->codec(), m_doc->configFlags() & KateDocument::cfRemoveSpaces); + + bool ok = false; + struct stat sbuf; + if (stat(QFile::encodeName(m_file), &sbuf) == 0) + { + if (S_ISREG(sbuf.st_mode) && file.open()) + ok = true; + } + + if (!ok) + { + clear(); + return false; // Error + } + + // set eol mode, if a eol char was found in the first 256kb block and we allow this at all! + if (m_doc->config()->allowEolDetection() && (file.eol() != -1)) + m_doc->config()->setEol (file.eol()); + + // flush current content + clear (); + + // cleanup the blocks + for (uint i=0; i < m_blocks.size(); i++) + delete m_blocks[i]; + + m_blocks.clear (); + + // do the real work + KateBufBlock *block = 0; + m_lines = 0; + while (!file.eof() && !m_cacheWriteError) + { + block = new KateBufBlock (this, block, 0, &file); + + m_lines = block->endLine (); + + if (m_cacheWriteError || (block->lines() == 0)) + { + delete block; + break; + } + else + m_blocks.append (block); + } + + // we had a cache write error, this load is really borked ! + if (m_cacheWriteError) + m_loadingBorked = true; + + if (m_blocks.isEmpty() || (m_lines == 0)) + { + // file was really empty, clean the buffers + emit the line changed + // loadingBorked will be false for such files, not matter what happened + // before + clear (); + } + else + { + // fix region tree + m_regionTree.fixRoot (m_lines); + } + + // if we have no hl or the "None" hl activated, whole file is correct highlighted + // after loading, which wonder ;) + if (!m_highlight || m_highlight->noHighlighting()) + { + m_lineHighlighted = m_lines; + m_lineHighlightedMax = m_lines; + } + + // binary? + m_binary = file.binary (); + + kdDebug (13020) << "LOADING DONE" << endl; + + return !m_loadingBorked; +} + +bool KateBuffer::canEncode () +{ + QTextCodec *codec = m_doc->config()->codec(); + + kdDebug(13020) << "ENC NAME: " << codec->name() << endl; + + // hardcode some unicode encodings which can encode all chars + if ((QString(codec->name()) == "UTF-8") || (QString(codec->name()) == "ISO-10646-UCS-2")) + return true; + + for (uint i=0; i < m_lines; i++) + { + if (!codec->canEncode (plainLine(i)->string())) + { + kdDebug(13020) << "STRING LINE: " << plainLine(i)->string() << endl; + kdDebug(13020) << "ENC WORKING: FALSE" << endl; + + return false; + } + } + + return true; +} + +bool KateBuffer::saveFile (const QString &m_file) +{ + QFile file (m_file); + QTextStream stream (&file); + + if ( !file.open( IO_WriteOnly ) ) + { + return false; // Error + } + + QTextCodec *codec = m_doc->config()->codec(); + + // disable Unicode headers + stream.setEncoding(QTextStream::RawUnicode); + + // this line sets the mapper to the correct codec + stream.setCodec(codec); + + // our loved eol string ;) + QString eol = m_doc->config()->eolString (); + + // should we strip spaces? + bool removeTrailingSpaces = m_doc->configFlags() & KateDocument::cfRemoveSpaces; + + // just dump the lines out ;) + for (uint i=0; i < m_lines; i++) + { + KateTextLine::Ptr textline = plainLine(i); + + // strip spaces + if (removeTrailingSpaces) + { + int lastChar = textline->lastChar(); + + if (lastChar > -1) + { + stream << QConstString (textline->text(), lastChar+1).string(); + } + } + else // simple, dump the line + stream << textline->string(); + + if ((i+1) < m_lines) + stream << eol; + } + + file.close (); + + m_loadingBorked = false; + + return (file.status() == IO_Ok); +} + +KateTextLine::Ptr KateBuffer::line_internal (KateBufBlock *buf, uint i) +{ + // update hl until this line + max KATE_HL_LOOKAHEAD + KateBufBlock *buf2 = 0; + while ((i >= m_lineHighlighted) && (buf2 = findBlock(m_lineHighlighted))) + { + uint end = kMin(i + KATE_HL_LOOKAHEAD, buf2->endLine()); + + doHighlight ( buf2, + kMax(m_lineHighlighted, buf2->startLine()), + end, + false ); + + m_lineHighlighted = end; + } + + // update hl max + if (m_lineHighlighted > m_lineHighlightedMax) + m_lineHighlightedMax = m_lineHighlighted; + + return buf->line (i - buf->startLine()); +} + +KateBufBlock *KateBuffer::findBlock_internal (uint i, uint *index) +{ + uint lastLine = m_blocks[m_lastInSyncBlock]->endLine (); + + if (lastLine > i) // we are in a allready known area ! + { + while (true) + { + KateBufBlock *buf = m_blocks[m_lastFoundBlock]; + + if ( (buf->startLine() <= i) + && (buf->endLine() > i) ) + { + if (index) + (*index) = m_lastFoundBlock; + + return m_blocks[m_lastFoundBlock]; + } + + if (i < buf->startLine()) + m_lastFoundBlock--; + else + m_lastFoundBlock++; + } + } + else // we need first to resync the startLines ! + { + if ((m_lastInSyncBlock+1) < m_blocks.size()) + m_lastInSyncBlock++; + else + return 0; + + for (; m_lastInSyncBlock < m_blocks.size(); m_lastInSyncBlock++) + { + // get next block + KateBufBlock *buf = m_blocks[m_lastInSyncBlock]; + + // sync startLine ! + buf->setStartLine (lastLine); + + // is it allready the searched block ? + if ((i >= lastLine) && (i < buf->endLine())) + { + // remember this block as last found ! + m_lastFoundBlock = m_lastInSyncBlock; + + if (index) + (*index) = m_lastFoundBlock; + + return buf; + } + + // increase lastLine with blocklinecount + lastLine += buf->lines (); + } + } + + // no block found ! + // index will not be set to any useful value in this case ! + return 0; +} + +void KateBuffer::changeLine(uint i) +{ + KateBufBlock *buf = findBlock(i); + + if (!buf) + return; + + // mark this block dirty + buf->markDirty (); + + // mark buffer changed + editChangesDone = true; + + // tag this line as changed + if (i < editTagLineStart) + editTagLineStart = i; + + if (i > editTagLineEnd) + editTagLineEnd = i; +} + +void KateBuffer::insertLine(uint i, KateTextLine::Ptr line) +{ + uint index = 0; + KateBufBlock *buf; + if (i == m_lines) + buf = findBlock(i-1, &index); + else + buf = findBlock(i, &index); + + if (!buf) + return; + + buf->insertLine(i - buf->startLine(), line); + + if (m_lineHighlightedMax > i) + m_lineHighlightedMax++; + + if (m_lineHighlighted > i) + m_lineHighlighted++; + + m_lines++; + + // last sync block adjust + if (m_lastInSyncBlock > index) + m_lastInSyncBlock = index; + + // last found + if (m_lastInSyncBlock < m_lastFoundBlock) + m_lastFoundBlock = m_lastInSyncBlock; + + // mark buffer changed + editChangesDone = true; + + // tag this line as inserted + if (i < editTagLineStart) + editTagLineStart = i; + + if (i <= editTagLineEnd) + editTagLineEnd++; + + if (i > editTagLineEnd) + editTagLineEnd = i; + + // line inserted + editTagLineFrom = true; + + m_regionTree.lineHasBeenInserted (i); +} + +void KateBuffer::removeLine(uint i) +{ + uint index = 0; + KateBufBlock *buf = findBlock(i, &index); + + if (!buf) + return; + + buf->removeLine(i - buf->startLine()); + + if (m_lineHighlightedMax > i) + m_lineHighlightedMax--; + + if (m_lineHighlighted > i) + m_lineHighlighted--; + + m_lines--; + + // trash away a empty block + if (buf->lines() == 0) + { + // we need to change which block is last in sync + if (m_lastInSyncBlock >= index) + { + m_lastInSyncBlock = index; + + if (buf->next()) + { + if (buf->prev()) + buf->next()->setStartLine (buf->prev()->endLine()); + else + buf->next()->setStartLine (0); + } + } + + // cu block ! + delete buf; + m_blocks.erase (m_blocks.begin()+index); + + // make sure we don't keep a pointer to the deleted block + if( m_lastInSyncBlock >= index ) + m_lastInSyncBlock = index - 1; + } + else + { + // last sync block adjust + if (m_lastInSyncBlock > index) + m_lastInSyncBlock = index; + } + + // last found + if (m_lastInSyncBlock < m_lastFoundBlock) + m_lastFoundBlock = m_lastInSyncBlock; + + // mark buffer changed + editChangesDone = true; + + // tag this line as removed + if (i < editTagLineStart) + editTagLineStart = i; + + if (i < editTagLineEnd) + editTagLineEnd--; + + if (i > editTagLineEnd) + editTagLineEnd = i; + + // line removed + editTagLineFrom = true; + + m_regionTree.lineHasBeenRemoved (i); +} + +void KateBuffer::setTabWidth (uint w) +{ + if ((m_tabWidth != w) && (m_tabWidth > 0)) + { + m_tabWidth = w; + + if (m_highlight && m_highlight->foldingIndentationSensitive()) + invalidateHighlighting(); + } +} + +void KateBuffer::setHighlight(uint hlMode) +{ + KateHighlighting *h = KateHlManager::self()->getHl(hlMode); + + // aha, hl will change + if (h != m_highlight) + { + bool invalidate = !h->noHighlighting(); + + if (m_highlight) + { + m_highlight->release(); + invalidate = true; + } + + h->use(); + + // Clear code folding tree (see bug #124102) + m_regionTree.clear(); + m_regionTree.fixRoot(m_lines); + + // try to set indentation + if (!h->indentation().isEmpty()) + m_doc->config()->setIndentationMode (KateAutoIndent::modeNumber(h->indentation())); + + m_highlight = h; + + if (invalidate) + invalidateHighlighting(); + + // inform the document that the hl was really changed + // needed to update attributes and more ;) + m_doc->bufferHlChanged (); + } +} + +void KateBuffer::invalidateHighlighting() +{ + m_lineHighlightedMax = 0; + m_lineHighlighted = 0; +} + + +void KateBuffer::updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,bool addindent,uint deindent) +{ + KateTextLine::Ptr textLine; + do { + if (current_line>0) current_line--; + else + { + uint line=blk->startLine()+current_line; + if (line==0) return; + line--; + blk=findBlock(line); + if (!blk) { + kdDebug(13020)<<"updatePreviousNotEmptyLine: block not found, this must not happen"<startLine(); + } + textLine = blk->line(current_line); + } while (textLine->firstChar()==-1); + kdDebug(13020)<<"updatePreviousNotEmptyLine: updating line:"<<(blk->startLine()+current_line)< foldingList=textLine->foldingListArray(); + while ( (foldingList.size()>0) && ( abs(foldingList[foldingList.size()-2])==1)) { + foldingList.resize(foldingList.size()-2,QGArray::SpeedOptim); + } + addIndentBasedFoldingInformation(foldingList,addindent,deindent); + textLine->setFoldingList(foldingList); + bool retVal_folding = false; + m_regionTree.updateLine (current_line + blk->startLine(), &foldingList, &retVal_folding, true,false); + emit tagLines (blk->startLine()+current_line, blk->startLine()+current_line); +} + +void KateBuffer::addIndentBasedFoldingInformation(QMemArray &foldingList,bool addindent,uint deindent) +{ + if (addindent) { + //kdDebug(13020)<<"adding indent for line :"<startLine()<<" textLine->noIndentBasedFoldingAtStart"<noIndentBasedFoldingAtStart()< 0) + { + foldingList.resize (foldingList.size() + (deindent*2), QGArray::SpeedOptim); + + for (uint z= foldingList.size()-(deindent*2); z < foldingList.size(); z=z+2) + { + foldingList[z] = -1; + foldingList[z+1] = 0; + } + } +} + +bool KateBuffer::doHighlight (KateBufBlock *buf, uint startLine, uint endLine, bool invalidate) +{ + // no hl around, no stuff to do + if (!m_highlight) + return false; + + /*if (m_highlight->foldingIndentationSensitive()) + { + startLine=0; + endLine=50; + }*/ + + // we tried to start in a line behind this buf block ! + if (startLine >= (buf->startLine()+buf->lines())) + return false; + + //QTime t; + //t.start(); + //kdDebug (13020) << "HIGHLIGHTED START --- NEED HL, LINESTART: " << startLine << " LINEEND: " << endLine << endl; + //kdDebug (13020) << "HL UNTIL LINE: " << m_lineHighlighted << " MAX: " << m_lineHighlightedMax << endl; + //kdDebug (13020) << "HL DYN COUNT: " << KateHlManager::self()->countDynamicCtxs() << " MAX: " << m_maxDynamicContexts << endl; + + // see if there are too many dynamic contexts; if yes, invalidate HL of all documents + if (KateHlManager::self()->countDynamicCtxs() >= m_maxDynamicContexts) + { + { + if (KateHlManager::self()->resetDynamicCtxs()) + { + kdDebug (13020) << "HL invalidated - too many dynamic contexts ( >= " << m_maxDynamicContexts << ")" << endl; + + // avoid recursive invalidation + KateHlManager::self()->setForceNoDCReset(true); + + for (KateDocument *doc = KateFactory::self()->documents()->first(); doc; doc = KateFactory::self()->documents()->next()) + doc->makeAttribs(); + + // doHighlight *shall* do his work. After invalidation, some highlight has + // been recalculated, but *maybe not* until endLine ! So we shall force it manually... + KateBufBlock *buf = 0; + while ((endLine > m_lineHighlighted) && (buf = findBlock(m_lineHighlighted))) + { + uint end = kMin(endLine, buf->endLine()); + + doHighlight ( buf, + kMax(m_lineHighlighted, buf->startLine()), + end, + false ); + + m_lineHighlighted = end; + } + + KateHlManager::self()->setForceNoDCReset(false); + + return false; + } + else + { + m_maxDynamicContexts *= 2; + kdDebug (13020) << "New dynamic contexts limit: " << m_maxDynamicContexts << endl; + } + } + } + + // get the previous line, if we start at the beginning of this block + // take the last line of the previous block + KateTextLine::Ptr prevLine = 0; + + if ((startLine == buf->startLine()) && buf->prev() && (buf->prev()->lines() > 0)) + prevLine = buf->prev()->line (buf->prev()->lines() - 1); + else if ((startLine > buf->startLine()) && (startLine <= buf->endLine())) + prevLine = buf->line(startLine - buf->startLine() - 1); + else + prevLine = new KateTextLine (); + + // does we need to emit a signal for the folding changes ? + bool codeFoldingUpdate = false; + + // here we are atm, start at start line in the block + uint current_line = startLine - buf->startLine(); + + // do we need to continue + bool stillcontinue=false; + bool indentContinueWhitespace=false; + bool indentContinueNextWhitespace=false; + // loop over the lines of the block, from startline to endline or end of block + // if stillcontinue forces us to do so + while ( (current_line < buf->lines()) + && (stillcontinue || ((current_line + buf->startLine()) <= endLine)) ) + { + // current line + KateTextLine::Ptr textLine = buf->line(current_line); + + QMemArray foldingList; + bool ctxChanged = false; + + m_highlight->doHighlight (prevLine, textLine, &foldingList, &ctxChanged); + + // + // indentation sensitive folding + // + bool indentChanged = false; + if (m_highlight->foldingIndentationSensitive()) + { + // get the indentation array of the previous line to start with ! + QMemArray indentDepth; + indentDepth.duplicate (prevLine->indentationDepthArray()); + + // current indentation of this line + uint iDepth = textLine->indentDepth(m_tabWidth); + if ((current_line+buf->startLine())==0) + { + indentDepth.resize (1, QGArray::SpeedOptim); + indentDepth[0] = iDepth; + } + + textLine->setNoIndentBasedFoldingAtStart(prevLine->noIndentBasedFolding()); + // this line is empty, beside spaces, or has indentaion based folding disabled, use indentation depth of the previous line ! + kdDebug(13020)<<"current_line:"<startLine()<<" textLine->noIndentBasedFoldingAtStart"<noIndentBasedFoldingAtStart()<firstChar() == -1) || textLine->noIndentBasedFoldingAtStart()) + { + // do this to get skipped empty lines indent right, which was given in the indenation array + if (!prevLine->indentationDepthArray().isEmpty()) + { + iDepth = (prevLine->indentationDepthArray())[prevLine->indentationDepthArray().size()-1]; + kdDebug(13020)<<"reusing old depth as current"<indentDepth(m_tabWidth); + kdDebug(13020)<<"creating indentdepth for previous line"<lines()) + { + if (buf->line(current_line+1)->firstChar() == -1) + { + nextLineIndentation = iDepth; + indentContinueNextWhitespace=true; + } + else + nextLineIndentation = buf->line(current_line+1)->indentDepth(m_tabWidth); + } + else + { + KateBufBlock *blk = buf->next(); + + if (blk && (blk->lines() > 0)) + { + if (blk->line (0)->firstChar() == -1) + { + nextLineIndentation = iDepth; + indentContinueNextWhitespace=true; + } + else + nextLineIndentation = blk->line (0)->indentDepth(m_tabWidth); + } + else nextLineIndentationValid=false; + } + + if (!textLine->noIndentBasedFoldingAtStart()) { + + if ((iDepth > 0) && (indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1] < iDepth))) + { + kdDebug(13020)<<"adding depth to \"stack\":"< -1; z--) + if (indentDepth[z]>iDepth) + indentDepth.resize(z, QGArray::SpeedOptim); + if ((iDepth > 0) && (indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1] < iDepth))) + { + kdDebug(13020)<<"adding depth to \"stack\":"<firstChar()==-1) { + + } + } + } + } + } + + if (!textLine->noIndentBasedFolding()) + { + if (nextLineIndentationValid) + { + //if (textLine->firstChar()!=-1) + { + kdDebug(13020)<<"nextLineIndentation:"<0) && ( indentDepth.isEmpty() || (indentDepth[indentDepth.size()-1]nextLineIndentation)) + { + kdDebug(13020)<<"...."< -1; z--) + { + kdDebug(13020)<nextLineIndentation) + deindent++; + } + } + } +/* } + if (textLine->noIndentBasedFolding()) kdDebug(13020)<<"=============================indentation based folding disabled======================"<noIndentBasedFolding()) {*/ + if ((textLine->firstChar()==-1)) { + updatePreviousNotEmptyLine(buf,current_line,addindent,deindent); + codeFoldingUpdate=true; + } + else + { + addIndentBasedFoldingInformation(foldingList,addindent,deindent); + } + } + } + } + indentChanged = !(indentDepth == textLine->indentationDepthArray()); + + // assign the new array to the textline ! + if (indentChanged) + textLine->setIndentationDepth (indentDepth); + + indentContinueWhitespace=textLine->firstChar()==-1; + } + bool foldingColChanged=false; + bool foldingChanged = false; //!(foldingList == textLine->foldingListArray()); + if (foldingList.size()!=textLine->foldingListArray().size()) { + foldingChanged=true; + } else { + QMemArray::ConstIterator it=foldingList.begin(); + QMemArray::ConstIterator it1=textLine->foldingListArray(); + bool markerType=true; + for(;it!=foldingList.end();++it,++it1) { + if (markerType) { + if ( ((*it)!=(*it1))) { + foldingChanged=true; + foldingColChanged=false; + break; + } + } else { + if ((*it)!=(*it1)) { + foldingColChanged=true; + } + } + markerType=!markerType; + } + } + + if (foldingChanged || foldingColChanged) { + textLine->setFoldingList(foldingList); + if (foldingChanged==false){ + textLine->setFoldingColumnsOutdated(textLine->foldingColumnsOutdated() | foldingColChanged); + } else textLine->setFoldingColumnsOutdated(false); + } + bool retVal_folding = false; + //perhaps make en enums out of the change flags + m_regionTree.updateLine (current_line + buf->startLine(), &foldingList, &retVal_folding, foldingChanged,foldingColChanged); + + codeFoldingUpdate = codeFoldingUpdate | retVal_folding; + + // need we to continue ? + stillcontinue = ctxChanged || indentChanged || indentContinueWhitespace || indentContinueNextWhitespace; + + // move around the lines + prevLine = textLine; + + // increment line + current_line++; + } + + buf->markDirty (); + + // tag the changed lines ! + if (invalidate) + emit tagLines (startLine, current_line + buf->startLine()); + + // emit that we have changed the folding + if (codeFoldingUpdate) + emit codeFoldingUpdated(); + + //kdDebug (13020) << "HIGHLIGHTED END --- NEED HL, LINESTART: " << startLine << " LINEEND: " << endLine << endl; + //kdDebug (13020) << "HL UNTIL LINE: " << m_lineHighlighted << " MAX: " << m_lineHighlightedMax << endl; + //kdDebug (13020) << "HL DYN COUNT: " << KateHlManager::self()->countDynamicCtxs() << " MAX: " << m_maxDynamicContexts << endl; + //kdDebug (13020) << "TIME TAKEN: " << t.elapsed() << endl; + + // if we are at the last line of the block + we still need to continue + // return the need of that ! + return stillcontinue && ((current_line+1) == buf->lines()); +} + +void KateBuffer::codeFoldingColumnUpdate(unsigned int lineNr) { + KateTextLine::Ptr line=plainLine(lineNr); + if (!line) return; + if (line->foldingColumnsOutdated()) { + line->setFoldingColumnsOutdated(false); + bool tmp; + QMemArray folding=line->foldingListArray(); + m_regionTree.updateLine(lineNr,&folding,&tmp,true,false); + } +} + +//BEGIN KateBufBlock + +KateBufBlock::KateBufBlock ( KateBuffer *parent, KateBufBlock *prev, KateBufBlock *next, + KateFileLoader *stream ) +: m_state (KateBufBlock::stateDirty), + m_startLine (0), + m_lines (0), + m_vmblock (0), + m_vmblockSize (0), + m_parent (parent), + m_prev (prev), + m_next (next), + list (0), + listPrev (0), + listNext (0) +{ + // init startline + the next pointers of the neighbour blocks + if (m_prev) + { + m_startLine = m_prev->endLine (); + m_prev->m_next = this; + } + + if (m_next) + m_next->m_prev = this; + + // we have a stream, use it to fill the block ! + // this can lead to 0 line blocks which are invalid ! + if (stream) + { + // this we lead to either dirty or swapped state + fillBlock (stream); + } + else // init the block if no stream given ! + { + // fill in one empty line ! + KateTextLine::Ptr textLine = new KateTextLine (); + m_stringList.push_back (textLine); + m_lines++; + + // if we have allready enough blocks around, swap one + if (m_parent->m_loadedBlocks.count() >= KateBuffer::maxLoadedBlocks()) + m_parent->m_loadedBlocks.first()->swapOut(); + + // we are a new nearly empty dirty block + m_state = KateBufBlock::stateDirty; + m_parent->m_loadedBlocks.append (this); + } +} + +KateBufBlock::~KateBufBlock () +{ + // sync prev/next pointers + if (m_prev) + m_prev->m_next = m_next; + + if (m_next) + m_next->m_prev = m_prev; + + // if we have some swapped data allocated, free it now or never + if (m_vmblock) + KateFactory::self()->vm()->free(m_vmblock); + + // remove me from the list I belong + KateBufBlockList::remove (this); +} + +void KateBufBlock::fillBlock (KateFileLoader *stream) +{ + // is allready too much stuff around in mem ? + bool swap = m_parent->m_loadedBlocks.count() >= KateBuffer::maxLoadedBlocks(); + + QByteArray rawData; + + // calcs the approx size for KATE_AVG_BLOCK_SIZE chars ! + if (swap) + rawData.resize ((KATE_AVG_BLOCK_SIZE * sizeof(QChar)) + ((KATE_AVG_BLOCK_SIZE/80) * 8)); + + char *buf = rawData.data (); + uint size = 0; + uint blockSize = 0; + while (!stream->eof() && (blockSize < KATE_AVG_BLOCK_SIZE) && (m_lines < KATE_MAX_BLOCK_LINES)) + { + uint offset = 0, length = 0; + stream->readLine(offset, length); + const QChar *unicodeData = stream->unicode () + offset; + + // strip spaces at end of line + if ( stream->removeTrailingSpaces() ) + { + while (length > 0) + { + if (unicodeData[length-1].isSpace()) + --length; + else + break; + } + } + + blockSize += length; + + if (swap) + { + // create the swapped data on the fly, no need to waste time + // via going over the textline classes and dump them ! + char attr = KateTextLine::flagNoOtherData; + uint pos = size; + + // calc new size + size = size + 1 + sizeof(uint) + (sizeof(QChar)*length); + + if (size > rawData.size ()) + { + rawData.resize (size); + buf = rawData.data (); + } + + memcpy(buf+pos, (char *) &attr, 1); + pos += 1; + + memcpy(buf+pos, (char *) &length, sizeof(uint)); + pos += sizeof(uint); + + memcpy(buf+pos, (char *) unicodeData, sizeof(QChar)*length); + pos += sizeof(QChar)*length; + } + else + { + KateTextLine::Ptr textLine = new KateTextLine (); + textLine->insertText (0, length, unicodeData); + m_stringList.push_back (textLine); + } + + m_lines++; + } + + if (swap) + { + m_vmblock = KateFactory::self()->vm()->allocate(size); + m_vmblockSize = size; + + if (!rawData.isEmpty()) + { + if (!KateFactory::self()->vm()->copyBlock(m_vmblock, rawData.data(), 0, size)) + { + if (m_vmblock) + KateFactory::self()->vm()->free(m_vmblock); + + m_vmblock = 0; + m_vmblockSize = 0; + + m_parent->m_cacheWriteError = true; + } + } + + // fine, we are swapped ! + m_state = KateBufBlock::stateSwapped; + } + else + { + // we are a new dirty block without any swap data + m_state = KateBufBlock::stateDirty; + m_parent->m_loadedBlocks.append (this); + } + + kdDebug (13020) << "A BLOCK LOADED WITH LINES: " << m_lines << endl; +} + +KateTextLine::Ptr KateBufBlock::line(uint i) +{ + // take care that the string list is around !!! + if (m_state == KateBufBlock::stateSwapped) + swapIn (); + + // LRU + if (!m_parent->m_loadedBlocks.isLast(this)) + m_parent->m_loadedBlocks.append (this); + + return m_stringList[i]; +} + +void KateBufBlock::insertLine(uint i, KateTextLine::Ptr line) +{ + // take care that the string list is around !!! + if (m_state == KateBufBlock::stateSwapped) + swapIn (); + + m_stringList.insert (m_stringList.begin()+i, line); + m_lines++; + + markDirty (); +} + +void KateBufBlock::removeLine(uint i) +{ + // take care that the string list is around !!! + if (m_state == KateBufBlock::stateSwapped) + swapIn (); + + m_stringList.erase (m_stringList.begin()+i); + m_lines--; + + markDirty (); +} + +void KateBufBlock::markDirty () +{ + if (m_state != KateBufBlock::stateSwapped) + { + // LRU + if (!m_parent->m_loadedBlocks.isLast(this)) + m_parent->m_loadedBlocks.append (this); + + if (m_state == KateBufBlock::stateClean) + { + // if we have some swapped data allocated which is dirty, free it now + if (m_vmblock) + KateFactory::self()->vm()->free(m_vmblock); + + m_vmblock = 0; + m_vmblockSize = 0; + + // we are dirty + m_state = KateBufBlock::stateDirty; + } + } +} + +void KateBufBlock::swapIn () +{ + if (m_state != KateBufBlock::stateSwapped) + return; + + QByteArray rawData (m_vmblockSize); + + // what to do if that fails ? + if (!KateFactory::self()->vm()->copyBlock(rawData.data(), m_vmblock, 0, rawData.size())) + m_parent->m_cacheReadError = true; + + // reserve mem, keep realloc away on push_back + m_stringList.reserve (m_lines); + + char *buf = rawData.data(); + for (uint i=0; i < m_lines; i++) + { + KateTextLine::Ptr textLine = new KateTextLine (); + buf = textLine->restore (buf); + m_stringList.push_back (textLine); + } + + // if we have allready enough blocks around, swap one + if (m_parent->m_loadedBlocks.count() >= KateBuffer::maxLoadedBlocks()) + m_parent->m_loadedBlocks.first()->swapOut(); + + // fine, we are now clean again, save state + append to clean list + m_state = KateBufBlock::stateClean; + m_parent->m_loadedBlocks.append (this); +} + +void KateBufBlock::swapOut () +{ + if (m_state == KateBufBlock::stateSwapped) + return; + + if (m_state == KateBufBlock::stateDirty) + { + bool haveHl = m_parent->m_highlight && !m_parent->m_highlight->noHighlighting(); + + // Calculate size. + uint size = 0; + for (uint i=0; i < m_lines; i++) + size += m_stringList[i]->dumpSize (haveHl); + + QByteArray rawData (size); + char *buf = rawData.data(); + + // Dump textlines + for (uint i=0; i < m_lines; i++) + buf = m_stringList[i]->dump (buf, haveHl); + + m_vmblock = KateFactory::self()->vm()->allocate(rawData.size()); + m_vmblockSize = rawData.size(); + + if (!rawData.isEmpty()) + { + if (!KateFactory::self()->vm()->copyBlock(m_vmblock, rawData.data(), 0, rawData.size())) + { + if (m_vmblock) + KateFactory::self()->vm()->free(m_vmblock); + + m_vmblock = 0; + m_vmblockSize = 0; + + m_parent->m_cacheWriteError = true; + + return; + } + } + } + + m_stringList.clear(); + + // we are now swapped out, set state + remove us out of the lists ! + m_state = KateBufBlock::stateSwapped; + KateBufBlockList::remove (this); +} + +//END KateBufBlock + +//BEGIN KateBufBlockList + +KateBufBlockList::KateBufBlockList () + : m_count (0), + m_first (0), + m_last (0) +{ +} + +void KateBufBlockList::append (KateBufBlock *buf) +{ + if (buf->list) + buf->list->removeInternal (buf); + + m_count++; + + // append a element + if (m_last) + { + m_last->listNext = buf; + + buf->listPrev = m_last; + buf->listNext = 0; + + m_last = buf; + + buf->list = this; + + return; + } + + // insert the first element + m_last = buf; + m_first = buf; + + buf->listPrev = 0; + buf->listNext = 0; + + buf->list = this; +} + +void KateBufBlockList::removeInternal (KateBufBlock *buf) +{ + if (buf->list != this) + return; + + m_count--; + + if ((buf == m_first) && (buf == m_last)) + { + // last element removed ! + m_first = 0; + m_last = 0; + } + else if (buf == m_first) + { + // first element removed + m_first = buf->listNext; + m_first->listPrev = 0; + } + else if (buf == m_last) + { + // last element removed + m_last = buf->listPrev; + m_last->listNext = 0; + } + else + { + buf->listPrev->listNext = buf->listNext; + buf->listNext->listPrev = buf->listPrev; + } + + buf->listPrev = 0; + buf->listNext = 0; + + buf->list = 0; +} + +//END KateBufBlockList + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katebuffer.h b/kate/part/katebuffer.h new file mode 100644 index 000000000..6b2d48ead --- /dev/null +++ b/kate/part/katebuffer.h @@ -0,0 +1,709 @@ +/* This file is part of the KDE libraries + Copyright (c) 2000 Waldo Bastian + Copyright (C) 2002-2004 Christoph Cullmann + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __KATE_BUFFER_H__ +#define __KATE_BUFFER_H__ + +#include "katetextline.h" +#include "katecodefoldinghelpers.h" + +#include + +#include +#include +#include +#include + +class KateLineInfo; +class KateDocument; +class KateHighlighting; +class KateBufBlockList; +class KateBuffer; +class KateFileLoader; + +class QTextCodec; + +/** + * The KateBufBlock class contains an amount of data representing + * a certain number of lines. + * + * @author Waldo Bastian + * @author Christoph Cullmann + */ +class KateBufBlock +{ + friend class KateBufBlockList; + + public: + /** + * Create an empty block. (empty == ONE line) + * @param parent buffer the block belongs to + * @param prev previous bufblock in the list + * @param next next bufblock in the list + * @param stream stream to load the content from, if any given + */ + KateBufBlock ( KateBuffer *parent, KateBufBlock *prev = 0, KateBufBlock *next = 0, + KateFileLoader *stream = 0 ); + + /** + * destroy this block and take care of freeing all mem + */ + ~KateBufBlock (); + + private: + /** + * fill the block with the lines from the given stream + * @param stream stream to load data from + */ + void fillBlock (KateFileLoader *stream); + + public: + /** + * state flags + */ + enum State + { + stateSwapped = 0, + stateClean = 1, + stateDirty = 2 + }; + + /** + * returns the current state of this block + * @return state + */ + State state () const { return m_state; } + + public: + /** + * return line @p i + * The first line of this block is line 0. + * if you modifiy this line, please mark the block as dirty + * @param i line to return + * @return line pointer + */ + KateTextLine::Ptr line(uint i); + + /** + * insert @p line in front of line @p i + * marks the block dirty + * @param i where to insert + * @param line line pointer + */ + void insertLine(uint i, KateTextLine::Ptr line); + + /** + * remove line @p i + * marks the block dirty + * @param i line to remove + */ + void removeLine(uint i); + + /** + * mark this block as dirty, will invalidate the swap data + * insert/removeLine will mark the block dirty itself + */ + void markDirty (); + + public: + /** + * startLine + * @return first line in block + */ + inline uint startLine () const { return m_startLine; }; + + /** + * update the first line, needed to keep it up to date + * @param line new startLine + */ + inline void setStartLine (uint line) { m_startLine = line; } + + /** + * first line behind this block + * @return line behind block + */ + inline uint endLine () const { return m_startLine + m_lines; } + + /** + * lines in this block + * @return lines + */ + inline uint lines () const { return m_lines; } + + /** + * prev block + * @return previous block + */ + inline KateBufBlock *prev () { return m_prev; } + + /** + * next block + * @return next block + */ + inline KateBufBlock *next () { return m_next; } + + /** + * methodes to swap in/out + */ + private: + /** + * swap in the kvmallocater data, create string list + */ + void swapIn (); + + /** + * swap our string list out, delete it ! + */ + void swapOut (); + + private: + /** + * VERY IMPORTANT, state of this block + * this uchar indicates if the block is swapped, loaded, clean or dirty + */ + KateBufBlock::State m_state; + + /** + * IMPORTANT, start line + */ + uint m_startLine; + + /** + * IMPORTANT, line count + */ + uint m_lines; + + /** + * here we swap our stuff + */ + KVMAllocator::Block *m_vmblock; + + /** + * swapped size + */ + uint m_vmblockSize; + + /** + * list of textlines + */ + QValueVector m_stringList; + + /** + * parent buffer. + */ + KateBuffer* m_parent; + + /** + * prev block + */ + KateBufBlock *m_prev; + + /** + * next block + */ + KateBufBlock *m_next; + + private: + /** + * list pointer, to which list I belong + * list element pointers for the KateBufBlockList ONLY !!! + */ + KateBufBlockList *list; + + /** + * prev list item + */ + KateBufBlock *listPrev; + + /** + * next list item + */ + KateBufBlock *listNext; +}; + +/** + * list which allows O(1) inserts/removes + * will not delete the elements on remove + * will use the next/prevNode pointers in the KateBufBlocks ! + * internal use: loaded/clean/dirty block lists + * + * @author Christoph Cullmann + */ +class KateBufBlockList +{ + public: + /** + * Default Constructor + */ + KateBufBlockList (); + + public: + /** + * count of blocks in this list + * @return count of blocks + */ + inline uint count() const { return m_count; } + + /** + * first block in this list or 0 + * @return head of list + */ + inline KateBufBlock *first () { return m_first; }; + + /** + * last block in this list or 0 + * @return end of list + */ + inline KateBufBlock *last () { return m_last; }; + + /** + * is buf the last block? + * @param buf block to test + * @return is this block the first one? + */ + inline bool isFirst (KateBufBlock *buf) { return m_first == buf; }; + + /** + * is buf the last block? + * @param buf block to test + * @return is this block the last one? + */ + inline bool isLast (KateBufBlock *buf) { return m_last == buf; }; + + /** + * append a block to this list ! + * will remove it from the list it belonged before ! + * @param buf block to append + */ + void append (KateBufBlock *buf); + + /** + * remove the block from the list it belongs to ! + * @param buf block to remove + */ + inline static void remove (KateBufBlock *buf) + { + if (buf->list) + buf->list->removeInternal (buf); + } + + private: + /** + * internal helper for remove + * @param buf block to remove + */ + void removeInternal (KateBufBlock *buf); + + private: + /** + * count of blocks in list + */ + uint m_count; + + /** + * first block + */ + KateBufBlock *m_first; + + /** + * last block + */ + KateBufBlock *m_last; +}; + +/** + * The KateBuffer class maintains a collections of lines. + * It allows to maintain state information in a lazy way. + * It handles swapping out of data using secondary storage. + * + * It is designed to handle large amounts of text-data efficiently + * with respect to CPU and memory usage. + * + * @author Waldo Bastian + * @author Christoph Cullmann + */ +class KateBuffer : public QObject +{ + Q_OBJECT + + friend class KateBufBlock; + + public: + /** + * maximal loaded block count + * @return max loaded blocks + */ + inline static uint maxLoadedBlocks () { return m_maxLoadedBlocks; } + + /** + * modifier for max loaded blocks limit + * @param count new limit + */ + static void setMaxLoadedBlocks (uint count); + + private: + /** + * global max loaded blocks limit + */ + static uint m_maxLoadedBlocks; + + public: + /** + * Create an empty buffer. + * @param doc parent document + */ + KateBuffer (KateDocument *doc); + + /** + * Goodbye buffer + */ + ~KateBuffer (); + + public: + /** + * start some editing action + */ + void editStart (); + + /** + * finish some editing action + */ + void editEnd (); + + /** + * were there changes in the current running + * editing session? + * @return changes done? + */ + inline bool editChanged () const { return editChangesDone; } + + /** + * dirty lines start + * @return start line + */ + inline uint editTagStart () const { return editTagLineStart; } + + /** + * dirty lines end + * @return end line + */ + inline uint editTagEnd () const { return editTagLineEnd; } + + /** + * line inserted/removed? + * @return line inserted/removed? + */ + inline bool editTagFrom () const { return editTagLineFrom; } + + private: + /** + * edit session recursion + */ + uint editSessionNumber; + + /** + * is a edit session running + */ + bool editIsRunning; + + /** + * dirty lines start at line + */ + uint editTagLineStart; + + /** + * dirty lines end at line + */ + uint editTagLineEnd; + + /** + * a line was inserted or removed + */ + bool editTagLineFrom; + + /** + * changes done? + */ + bool editChangesDone; + + public: + /** + * Clear the buffer. + */ + void clear(); + + /** + * Open a file, use the given filename + * @param m_file filename to open + * @return success + */ + bool openFile (const QString &m_file); + + /** + * was the last loading broken because of not enough tmp disk space ? + * (will be reseted on successful save of the file, user gets warning if he really wants to do it) + * @return was loading borked? + */ + bool loadingBorked () const { return m_loadingBorked; } + + /** + * is this file a binary? + * @return binary file? + */ + bool binary () const { return m_binary; } + + /** + * Can the current codec handle all chars + * @return chars can be encoded + */ + bool canEncode (); + + /** + * Save the buffer to a file, use the given filename + codec + end of line chars (internal use of qtextstream) + * @param m_file filename to save to + * @return success + */ + bool saveFile (const QString &m_file); + + public: + /** + * Return line @p i + */ + inline KateTextLine::Ptr line(uint i) + { + KateBufBlock *buf = findBlock(i); + if (!buf) + return 0; + + if (i < m_lineHighlighted) + return buf->line (i - buf->startLine()); + + return line_internal (buf, i); + } + + private: + /** + * line needs hl + */ + KateTextLine::Ptr line_internal (KateBufBlock *buf, uint i); + + inline void addIndentBasedFoldingInformation(QMemArray &foldingList,bool addindent,uint deindent); + inline void updatePreviousNotEmptyLine(KateBufBlock *blk,uint current_line,bool addindent,uint deindent); + public: + /** + * Return line @p i without triggering highlighting + */ + inline KateTextLine::Ptr plainLine(uint i) + { + KateBufBlock *buf = findBlock(i); + if (!buf) + return 0; + + return buf->line(i - buf->startLine()); + } + + /** + * Return the total number of lines in the buffer. + */ + inline uint count() const { return m_lines; } + + private: + /** + * Find the block containing line @p i + * index pointer gets filled with index of block in m_blocks + * index only valid if returned block != 0 ! + */ + KateBufBlock *findBlock (uint i, uint *index = 0) + { + // out of range ! + if (i >= m_lines) + return 0; + + if ((m_blocks[m_lastFoundBlock]->startLine() <= i) && (m_blocks[m_lastFoundBlock]->endLine() > i)) + { + if (index) + (*index) = m_lastFoundBlock; + + return m_blocks[m_lastFoundBlock]; + } + + return findBlock_internal (i, index); + } + + KateBufBlock *findBlock_internal (uint i, uint *index = 0); + + public: + /** + * Mark line @p i as changed ! + */ + void changeLine(uint i); + + /** + * Insert @p line in front of line @p i + */ + void insertLine(uint i, KateTextLine::Ptr line); + + /** + * Remove line @p i + */ + void removeLine(uint i); + + public: + inline uint countVisible () { return m_lines - m_regionTree.getHiddenLinesCount(m_lines); } + + inline uint lineNumber (uint visibleLine) { return m_regionTree.getRealLine (visibleLine); } + + inline uint lineVisibleNumber (uint line) { return m_regionTree.getVirtualLine (line); } + + inline void lineInfo (KateLineInfo *info, unsigned int line) { m_regionTree.getLineInfo(info,line); } + + inline uint tabWidth () const { return m_tabWidth; } + + public: + void setTabWidth (uint w); + + /** + * Use @p highlight for highlighting + * + * @p highlight may be 0 in which case highlighting + * will be disabled. + */ + void setHighlight (uint hlMode); + + KateHighlighting *highlight () { return m_highlight; }; + + /** + * Invalidate highlighting of whole buffer. + */ + void invalidateHighlighting(); + + KateCodeFoldingTree *foldingTree () { return &m_regionTree; }; + + public slots: + void codeFoldingColumnUpdate(unsigned int lineNr); + + private: + /** + * Highlight information needs to be updated. + * + * @param buf The buffer being processed. + * @param startState highlighting state of last line before range + * @param from first line in range + * @param to last line in range + * @param invalidat should the rehighlighted lines be tagged ? + * + * @returns true when the highlighting in the next block needs to be updated, + * false otherwise. + */ + bool doHighlight (KateBufBlock *buf, uint from, uint to, bool invalidate); + + signals: + /** + * Emittend if codefolding returned with a changed list + */ + void codeFoldingUpdated(); + + /** + * Emitted when the highlighting of a certain range has + * changed. + */ + void tagLines(int start, int end); + + private: + /** + * document we belong too + */ + KateDocument *m_doc; + + /** + * current line count + */ + uint m_lines; + + /** + * ALL blocks + * in order of linenumbers + */ + QValueVector m_blocks; + + /** + * last block where the start/end line is in sync with real life + */ + uint m_lastInSyncBlock; + + /** + * last block found by findBlock, there to make searching faster + */ + uint m_lastFoundBlock; + + /** + * status of the cache read/write errors + * write errors get handled, read errors not really atm + */ + bool m_cacheReadError; + bool m_cacheWriteError; + + /** + * had we cache error while loading ? + */ + bool m_loadingBorked; + + /** + * binary file loaded ? + */ + bool m_binary; + + /** + * highlighting & folding relevant stuff + */ + private: + /** + * current highlighting mode or 0 + */ + KateHighlighting *m_highlight; + + /** + * folding tree + */ + KateCodeFoldingTree m_regionTree; + + // for the scrapty indent sensitive langs + uint m_tabWidth; + + uint m_lineHighlightedMax; + uint m_lineHighlighted; + + /** + * number of dynamic contexts causing a full invalidation + */ + uint m_maxDynamicContexts; + + /** + * only used from the KateBufBlocks ! + */ + private: + /** + * all not swapped blocks ! + */ + KateBufBlockList m_loadedBlocks; +}; + +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katecmds.cpp b/kate/part/katecmds.cpp new file mode 100644 index 000000000..17846dd7d --- /dev/null +++ b/kate/part/katecmds.cpp @@ -0,0 +1,605 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 - 2005 Anders Lund + Copyright (C) 2001-2004 Christoph Cullmann + Copyright (C) 2001 Charles Samuels + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "katecmds.h" + +#include "katedocument.h" +#include "kateview.h" +#include "kateconfig.h" +#include "kateautoindent.h" +#include "katetextline.h" +#include "katefactory.h" +#include "katejscript.h" +#include "katerenderer.h" + +#include "../interfaces/katecmd.h" + +#include +#include +#include +#include + +#include + + +//BEGIN CoreCommands +// syncs a config flag in the document with a boolean value +static void setDocFlag( KateDocumentConfig::ConfigFlags flag, bool enable, + KateDocument *doc ) +{ + doc->config()->setConfigFlags( flag, enable ); +} + +// this returns wheather the string s could be converted to +// a bool value, one of on|off|1|0|true|false. the argument val is +// set to the extracted value in case of success +static bool getBoolArg( QString s, bool *val ) +{ + bool res( false ); + s = s.lower(); + res = (s == "on" || s == "1" || s == "true"); + if ( res ) + { + *val = true; + return true; + } + res = (s == "off" || s == "0" || s == "false"); + if ( res ) + { + *val = false; + return true; + } + return false; +} + +QStringList KateCommands::CoreCommands::cmds() +{ + QStringList l; + l << "indent" << "unindent" << "cleanindent" + << "comment" << "uncomment" << "goto" << "kill-line" + << "set-tab-width" << "set-replace-tabs" << "set-show-tabs" + << "set-remove-trailing-space" + << "set-indent-spaces" << "set-indent-width" << "set-mixed-indent" + << "set-indent-mode" << "set-auto-indent" + << "set-line-numbers" << "set-folding-markers" << "set-icon-border" + << "set-wrap-cursor" + << "set-word-wrap" << "set-word-wrap-column" + << "set-replace-tabs-save" << "set-remove-trailing-space-save" + << "set-highlight" << "run-myself" << "set-show-indent"; + return l; +} + +bool KateCommands::CoreCommands::exec(Kate::View *view, + const QString &_cmd, + QString &errorMsg) +{ +#define KCC_ERR(s) { errorMsg=s; return false; } + // cast it hardcore, we know that it is really a kateview :) + KateView *v = (KateView*) view; + + if ( ! v ) + KCC_ERR( i18n("Could not access view") ); + + //create a list of args + QStringList args( QStringList::split( QRegExp("\\s+"), _cmd ) ); + QString cmd ( args.first() ); + args.remove( args.first() ); + + // ALL commands that takes no arguments. + if ( cmd == "indent" ) + { + v->indent(); + return true; + } + else if ( cmd == "run-myself" ) + { +#ifndef Q_WS_WIN //todo + return KateFactory::self()->jscript()->execute(v, v->doc()->text(), errorMsg); +#else + return 0; +#endif + } + else if ( cmd == "unindent" ) + { + v->unIndent(); + return true; + } + else if ( cmd == "cleanindent" ) + { + v->cleanIndent(); + return true; + } + else if ( cmd == "comment" ) + { + v->comment(); + return true; + } + else if ( cmd == "uncomment" ) + { + v->uncomment(); + return true; + } + else if ( cmd == "kill-line" ) + { + v->killLine(); + return true; + } + else if ( cmd == "set-indent-mode" ) + { + bool ok(false); + int val ( args.first().toInt( &ok ) ); + if ( ok ) + { + if ( val < 0 ) + KCC_ERR( i18n("Mode must be at least 0.") ); + v->doc()->config()->setIndentationMode( val ); + } + else + v->doc()->config()->setIndentationMode( KateAutoIndent::modeNumber( args.first() ) ); + return true; + } + else if ( cmd == "set-highlight" ) + { + QString val = _cmd.section( ' ', 1 ).lower(); + for ( uint i=0; i < v->doc()->hlModeCount(); i++ ) + { + if ( v->doc()->hlModeName( i ).lower() == val ) + { + v->doc()->setHlMode( i ); + return true; + } + } + KCC_ERR( i18n("No such highlight '%1'").arg( args.first() ) ); + } + + // ALL commands that takes exactly one integer argument. + else if ( cmd == "set-tab-width" || + cmd == "set-indent-width" || + cmd == "set-word-wrap-column" || + cmd == "goto" ) + { + // find a integer value > 0 + if ( ! args.count() ) + KCC_ERR( i18n("Missing argument. Usage: %1 ").arg( cmd ) ); + bool ok; + int val ( args.first().toInt( &ok ) ); + if ( !ok ) + KCC_ERR( i18n("Failed to convert argument '%1' to integer.") + .arg( args.first() ) ); + + if ( cmd == "set-tab-width" ) + { + if ( val < 1 ) + KCC_ERR( i18n("Width must be at least 1.") ); + v->setTabWidth( val ); + } + else if ( cmd == "set-indent-width" ) + { + if ( val < 1 ) + KCC_ERR( i18n("Width must be at least 1.") ); + v->doc()->config()->setIndentationWidth( val ); + } + else if ( cmd == "set-word-wrap-column" ) + { + if ( val < 2 ) + KCC_ERR( i18n("Column must be at least 1.") ); + v->doc()->setWordWrapAt( val ); + } + else if ( cmd == "goto" ) + { + if ( val < 1 ) + KCC_ERR( i18n("Line must be at least 1") ); + if ( (uint)val > v->doc()->numLines() ) + KCC_ERR( i18n("There is not that many lines in this document") ); + v->gotoLineNumber( val - 1 ); + } + return true; + } + + // ALL commands that takes 1 boolean argument. + else if ( cmd == "set-icon-border" || + cmd == "set-folding-markers" || + cmd == "set-line-numbers" || + cmd == "set-replace-tabs" || + cmd == "set-remove-trailing-space" || + cmd == "set-show-tabs" || + cmd == "set-indent-spaces" || + cmd == "set-mixed-indent" || + cmd == "set-word-wrap" || + cmd == "set-wrap-cursor" || + cmd == "set-replace-tabs-save" || + cmd == "set-remove-trailing-space-save" || + cmd == "set-show-indent" ) + { + if ( ! args.count() ) + KCC_ERR( i18n("Usage: %1 on|off|1|0|true|false").arg( cmd ) ); + bool enable; + if ( getBoolArg( args.first(), &enable ) ) + { + if ( cmd == "set-icon-border" ) + v->setIconBorder( enable ); + else if (cmd == "set-folding-markers") + v->setFoldingMarkersOn( enable ); + else if ( cmd == "set-line-numbers" ) + v->setLineNumbersOn( enable ); + else if ( cmd == "set-show-indent" ) + v->renderer()->setShowIndentLines( enable ); + else if ( cmd == "set-replace-tabs" ) + setDocFlag( KateDocumentConfig::cfReplaceTabsDyn, enable, v->doc() ); + else if ( cmd == "set-remove-trailing-space" ) + setDocFlag( KateDocumentConfig::cfRemoveTrailingDyn, enable, v->doc() ); + else if ( cmd == "set-show-tabs" ) + setDocFlag( KateDocumentConfig::cfShowTabs, enable, v->doc() ); + else if ( cmd == "set-indent-spaces" ) + setDocFlag( KateDocumentConfig::cfSpaceIndent, enable, v->doc() ); + else if ( cmd == "set-mixed-indent" ) + { + // this is special, in that everything is set up -- space-indent is enabled, + // and a indent-width is set if it is 0 (to tabwidth/2) + setDocFlag( KateDocumentConfig::cfMixedIndent, enable, v->doc() ); + if ( enable ) + { + setDocFlag( KateDocumentConfig::cfSpaceIndent, enable, v->doc() ); + if ( ! v->doc()->config()->indentationWidth() ) + v->doc()->config()->setIndentationWidth( v->tabWidth()/2 ); + } + } + else if ( cmd == "set-word-wrap" ) + v->doc()->setWordWrap( enable ); + else if ( cmd == "set-remove-trailing-space-save" ) + setDocFlag( KateDocumentConfig::cfRemoveSpaces, enable, v->doc() ); + else if ( cmd == "set-wrap-cursor" ) + setDocFlag( KateDocumentConfig::cfWrapCursor, enable, v->doc() ); + + return true; + } + else + KCC_ERR( i18n("Bad argument '%1'. Usage: %2 on|off|1|0|true|false") + .arg( args.first() ).arg( cmd ) ); + } + + // unlikely.. + KCC_ERR( i18n("Unknown command '%1'").arg(cmd) ); +} + +KCompletion *KateCommands::CoreCommands::completionObject( const QString &cmd, Kate::View *view ) +{ + if ( cmd == "set-highlight" ) + { + KateView *v = (KateView*)view; + QStringList l; + for ( uint i = 0; i < v->doc()->hlModeCount(); i++ ) + l << v->doc()->hlModeName( i ); + + KateCmdShellCompletion *co = new KateCmdShellCompletion(); + co->setItems( l ); + co->setIgnoreCase( true ); + return co; + } + return 0L; +} +//END CoreCommands + +//BEGIN SedReplace +static void replace(QString &s, const QString &needle, const QString &with) +{ + int pos=0; + while (1) + { + pos=s.find(needle, pos); + if (pos==-1) break; + s.replace(pos, needle.length(), with); + pos+=with.length(); + } + +} + +static int backslashString(const QString &haystack, const QString &needle, int index) +{ + int len=haystack.length(); + int searchlen=needle.length(); + bool evenCount=true; + while (indexkateTextLine( line ); + if ( ! ln || ! ln->length() ) return 0; + + // HANDLING "\n"s in PATTERN + // * Create a list of patterns, splitting PATTERN on (unescaped) "\n" + // * insert $s and ^s to match line ends/beginnings + // * When matching patterhs after the first one, replace \N with the captured + // text. + // * If all patterns in the list match sequentiel lines, there is a match, so + // * remove line/start to line + patterns.count()-1/patterns.last.length + // * handle capatures by putting them in one list. + // * the existing insertion is fine, including the line calculation. + + QStringList patterns = QStringList::split( QRegExp("(^\\\\n|(?![^\\\\])\\\\n)"), find, true ); + + if ( patterns.count() > 1 ) + { + for ( uint i = 0; i < patterns.count(); i++ ) + { + if ( i < patterns.count() - 1 ) + patterns[i].append("$"); + if ( i ) + patterns[i].prepend("^"); + + kdDebug(13025)<<"patterns["<searchText( startcol, matcher, &startcol, &len ) ) + { + + if ( endcol >= 0 && startcol + len > (uint)endcol ) + break; + + matches++; + + + QString rep=repOld; + + // now set the backreferences in the replacement + QStringList backrefs=matcher.capturedTexts(); + int refnum=1; + + QStringList::Iterator i = backrefs.begin(); + ++i; + + for (; i!=backrefs.end(); ++i) + { + // I need to match "\\" or "", but not "\" + QString number=QString::number(refnum); + + int index=0; + while (index!=-1) + { + index=backslashString(rep, number, index); + if (index>=0) + { + rep.replace(index, 2, *i); + index+=(*i).length(); + } + } + + refnum++; + } + + replace(rep, "\\\\", "\\"); + replace(rep, "\\" + delim, delim); + + doc->removeText( line, startcol, line, startcol + len ); + doc->insertText( line, startcol, rep ); + + // TODO if replace contains \n, + // change the line number and + // check for text that needs be searched behind the last inserted newline. + int lns = rep.contains('\n'); + if ( lns ) + { + line += lns; + + if ( doc->lineLength( line ) > 0 && ( endcol < 0 || (uint)endcol >= startcol + len ) ) + { + // if ( endcol >= startcol + len ) + endcol -= (startcol + len); + uint sc = rep.length() - rep.findRev('\n') - 1; + matches += sedMagic( doc, line, find, repOld, delim, noCase, repeat, sc, endcol ); + } + } + + if (!repeat) break; + startcol+=rep.length(); + + // sanity check -- avoid infinite loops eg with %s,.*,,g ;) + uint ll = ln->length(); + if ( ! ll || startcol > ll ) + break; + } + + return matches; +} + +bool KateCommands::SedReplace::exec (Kate::View *view, const QString &cmd, QString &msg) +{ + kdDebug(13025)<<"SedReplace::execCmd( "<doc(); + if ( ! doc ) return false; + + doc->editStart(); + + int res = 0; + + if (fullFile) + { + uint numLines=doc->numLines(); + for (int line=0; (uint)line < numLines; line++) + { + res += sedMagic( doc, line, find, replace, d, !noCase, repeat ); + if ( ! repeat && res ) break; + } + } + else if (onlySelect) + { + int startline = doc->selStartLine(); + uint startcol = doc->selStartCol(); + int endcol = -1; + do { + if ( startline == doc->selEndLine() ) + endcol = doc->selEndCol(); + + res += sedMagic( doc, startline, find, replace, d, !noCase, repeat, startcol, endcol ); + + /*if ( startcol )*/ startcol = 0; + + startline++; + } while ( (int)startline <= doc->selEndLine() ); + } + else // just this line + { + int line=view->cursorLine(); + res += sedMagic(doc, line, find, replace, d, !noCase, repeat); + } + + msg = i18n("1 replacement done", "%n replacements done",res ); + + doc->editEnd(); + + return true; +} +//END SedReplace + +//BEGIN Character +bool KateCommands::Character::exec (Kate::View *view, const QString &_cmd, QString &) +{ + QString cmd = _cmd; + + // hex, octal, base 9+1 + QRegExp num("^char *(0?x[0-9A-Fa-f]{1,4}|0[0-7]{1,6}|[0-9]{1,3})$"); + if (num.search(cmd)==-1) return false; + + cmd=num.cap(1); + + // identify the base + + unsigned short int number=0; + int base=10; + if (cmd[0]=='x' || cmd.left(2)=="0x") + { + cmd.replace(QRegExp("^0?x"), ""); + base=16; + } + else if (cmd[0]=='0') + base=8; + bool ok; + number=cmd.toUShort(&ok, base); + if (!ok || number==0) return false; + if (number<=255) + { + char buf[2]; + buf[0]=(char)number; + buf[1]=0; + view->insertText(QString(buf)); + } + else + { // do the unicode thing + QChar c(number); + view->insertText(QString(&c, 1)); + } + + return true; +} +//END Character + +//BEGIN Date +bool KateCommands::Date::exec (Kate::View *view, const QString &cmd, QString &) +{ + if (cmd.left(4) != "date") + return false; + + if (QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5)).length() > 0) + view->insertText(QDateTime::currentDateTime().toString(cmd.mid(5, cmd.length()-5))); + else + view->insertText(QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")); + + return true; +} +//END Date + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katecmds.h b/kate/part/katecmds.h new file mode 100644 index 000000000..84f7919d8 --- /dev/null +++ b/kate/part/katecmds.h @@ -0,0 +1,178 @@ +/* This file is part of the KDE libraries + Copyright (C) 2003 Anders Lund + Copyright (C) 2001-2004 Christoph Cullmann + Copyright (C) 2001 Charles Samuels + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef __KATE_CMDS_H__ +#define __KATE_CMDS_H__ + +#include "../interfaces/document.h" +#include "../interfaces/view.h" + +class KateDocument; +class KCompletion; + +namespace KateCommands +{ + +/** + * This Kate::Command provides access to a lot of the core functionality + * of kate part, settings, utilities, navigation etc. + * it needs to get a kateview pointer, it will cast the kate::view pointer + * hard to kateview + */ +class CoreCommands : public Kate::Command, public Kate::CommandExtension +{ + public: + /** + * execute command + * @param view view to use for execution + * @param cmd cmd string + * @param errorMsg error to return if no success + * @return success + */ + bool exec( class Kate::View *view, const QString &cmd, QString &errorMsg ); + + bool help( class Kate::View *, const QString &, QString & ) {return false;}; + + /** + * supported commands as prefixes + * @return prefix list + */ + QStringList cmds(); + + /** + * override completionObject from interfaces/document.h . + */ + KCompletion *completionObject( const QString &cmd, Kate::View *view ); +}; + +/** + * -- Charles Samuels + * Support vim/sed find and replace + * s/search/replace/ find search, replace with replace on this line + * %s/search/replace/ do the same to the whole file + * s/search/replace/i do the S. and R., but case insensitively + * $s/search/replace/ do the search are replacement to the selection only + * + * $s/// is currently unsupported + **/ +class SedReplace : public Kate::Command +{ + public: + /** + * execute command + * @param view view to use for execution + * @param cmd cmd string + * @param errorMsg error to return if no success + * @return success + */ + bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg); + + bool help (class Kate::View *, const QString &, QString &) { return false; }; + + /** + * supported commands as prefixes + * @return prefix list + */ + QStringList cmds () { QStringList l("s"); l << "%s" << "$s"; return l; }; + + private: + /** + * Searches one line and does the replacement in the document. + * If @p replace contains any newline characters, the reamaining part of the + * line is searched, and the @p line set to the last line number searched. + * @return the number of replacements performed. + * @param doc a pointer to the document to work on + * @param line the number of the line to search. This may be changed by the + * function, if newlines are inserted. + * @param find A regular expression pattern to use for searching + * @param replace a template for replacement. Backspaced integers are + * replaced with captured texts from the regular expression. + * @param delim the delimiter character from the command. In the replacement + * text backsplashes preceeding this character are removed. + * @param nocase parameter for matching the reqular expression. + * @param repeat If false, the search is stopped after the first match. + * @param startcol The position in the line to start the search. + * @param endcol The last collumn in the line allowed in a match. + * If it is -1, the whole line is used. + */ + static int sedMagic(KateDocument *doc, int &line, + const QString &find, const QString &replace, const QString &delim, + bool noCase, bool repeat, + uint startcol=0, int endcol=-1); +}; + +/** + * insert a unicode or ascii character + * base 9+1: 1234 + * hex: 0x1234 or x1234 + * octal: 01231 + * + * prefixed with "char:" + **/ +class Character : public Kate::Command +{ + public: + /** + * execute command + * @param view view to use for execution + * @param cmd cmd string + * @param errorMsg error to return if no success + * @return success + */ + bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg); + + bool help (class Kate::View *, const QString &, QString &) { return false; }; + + /** + * supported commands as prefixes + * @return prefix list + */ + QStringList cmds () { return QStringList("char"); }; +}; + +/** + * insert the current date/time in the given format + */ +class Date : public Kate::Command +{ + public: + /** + * execute command + * @param view view to use for execution + * @param cmd cmd string + * @param errorMsg error to return if no success + * @return success + */ + bool exec (class Kate::View *view, const QString &cmd, QString &errorMsg); + + bool help (class Kate::View *, const QString &, QString &) { return false; }; + + /** + * supported commands as prefixes + * @return prefix list + */ + QStringList cmds () { return QStringList("date"); }; +}; + + +} // namespace KateCommands +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katecodecompletion.cpp b/kate/part/katecodecompletion.cpp new file mode 100644 index 000000000..bbc34dfca --- /dev/null +++ b/kate/part/katecodecompletion.cpp @@ -0,0 +1,566 @@ +/* This file is part of the KDE libraries + Copyright (C) 2001 Joseph Wenninger + Copyright (C) 2002 John Firebaugh + Copyright (C) 2001 by Victor Röder + Copyright (C) 2002 by Roberto Raggi + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +/******** Partly based on the ArgHintWidget of Qt3 by Trolltech AS *********/ +/* Trolltech doesn't mind, if we license that piece of code as LGPL, because there isn't much + * left from the desigener code */ + +#include "katecodecompletion.h" +#include "katecodecompletion.moc" + +#include "katedocument.h" +#include "kateview.h" +#include "katerenderer.h" +#include "kateconfig.h" +#include "katefont.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/** + * This class is used as the codecompletion listbox. It can be resized according to its contents, + * therfor the needed size is provided by sizeHint(); + *@short Listbox showing codecompletion + *@author Jonas B. Jacobi + */ +class KateCCListBox : public QListBox +{ + public: + /** + @short Create a new CCListBox + */ + KateCCListBox (QWidget* parent = 0, const char* name = 0, WFlags f = 0):QListBox(parent, name, f) + { + } + + QSize sizeHint() const + { + int count = this->count(); + int height = 20; + int tmpwidth = 8; + //FIXME the height is for some reasons at least 3 items heigh, even if there is only one item in the list + if (count > 0) + if(count < 11) + height = count * itemHeight(0); + else { + height = 10 * itemHeight(0); + tmpwidth += verticalScrollBar()->width(); + } + + int maxcount = 0, tmpcount = 0; + for (int i = 0; i < count; ++i) + if ( (tmpcount = fontMetrics().width(text(i)) ) > maxcount) + maxcount = tmpcount; + + if (maxcount > QApplication::desktop()->width()){ + tmpwidth = QApplication::desktop()->width() - 5; + height += horizontalScrollBar()->height(); + } else + tmpwidth += maxcount; + return QSize(tmpwidth,height); + + } +}; + +class KateCompletionItem : public QListBoxText +{ + public: + KateCompletionItem( QListBox* lb, KTextEditor::CompletionEntry entry ) + : QListBoxText( lb ) + , m_entry( entry ) + { + if( entry.postfix == "()" ) { // should be configurable + setText( entry.prefix + " " + entry.text + entry.postfix ); + } else { + setText( entry.prefix + " " + entry.text + " " + entry.postfix); + } + } + + KTextEditor::CompletionEntry m_entry; +}; + + +KateCodeCompletion::KateCodeCompletion( KateView* view ) + : QObject( view, "Kate Code Completion" ) + , m_view( view ) + , m_commentLabel( 0 ) +{ + m_completionPopup = new QVBox( 0, 0, WType_Popup ); + m_completionPopup->setFrameStyle( QFrame::Box | QFrame::Plain ); + m_completionPopup->setLineWidth( 1 ); + + m_completionListBox = new KateCCListBox( m_completionPopup ); + m_completionListBox->setFrameStyle( QFrame::NoFrame ); + //m_completionListBox->setCornerWidget( new QSizeGrip( m_completionListBox) ); + m_completionListBox->setFocusProxy( m_view->m_viewInternal ); + + m_completionListBox->installEventFilter( this ); + + m_completionPopup->resize(m_completionListBox->sizeHint() + QSize(2,2)); + m_completionPopup->installEventFilter( this ); + m_completionPopup->setFocusProxy( m_view->m_viewInternal ); + + m_pArgHint = new KateArgHint( m_view ); + connect( m_pArgHint, SIGNAL(argHintHidden()), + this, SIGNAL(argHintHidden()) ); + + connect( m_view, SIGNAL(cursorPositionChanged()), + this, SLOT(slotCursorPosChanged()) ); +} + +KateCodeCompletion::~KateCodeCompletion() +{ + delete m_completionPopup; +} + +bool KateCodeCompletion::codeCompletionVisible () { + return m_completionPopup->isVisible(); +} + +void KateCodeCompletion::showCompletionBox( + QValueList complList, int offset, bool casesensitive ) +{ + kdDebug(13035) << "showCompletionBox " << endl; + + if ( codeCompletionVisible() ) return; + + m_caseSensitive = casesensitive; + m_complList = complList; + m_offset = offset; + m_view->cursorPositionReal( &m_lineCursor, &m_colCursor ); + m_colCursor -= offset; + + updateBox( true ); +} + +bool KateCodeCompletion::eventFilter( QObject *o, QEvent *e ) +{ + if ( o != m_completionPopup && + o != m_completionListBox && + o != m_completionListBox->viewport() ) + return false; + + if( e->type() == QEvent::Hide ) + { + //don't use abortCompletion() as aborting here again will send abort signal + //even on successfull completion we will emit completionAborted() twice... + m_completionPopup->hide(); + delete m_commentLabel; + m_commentLabel = 0; + return false; + } + + + if ( e->type() == QEvent::MouseButtonDblClick ) { + doComplete(); + return false; + } + + if ( e->type() == QEvent::MouseButtonPress ) { + QTimer::singleShot(0, this, SLOT(showComment())); + return false; + } + + return false; +} + +void KateCodeCompletion::handleKey (QKeyEvent *e) +{ + // close completion if you move out of range + if ((e->key() == Key_Up) && (m_completionListBox->currentItem() == 0)) + { + abortCompletion(); + m_view->setFocus(); + return; + } + + // keyboard movement + if( (e->key() == Key_Up) || (e->key() == Key_Down ) || + (e->key() == Key_Home ) || (e->key() == Key_End) || + (e->key() == Key_Prior) || (e->key() == Key_Next )) + { + QTimer::singleShot(0,this,SLOT(showComment())); + QApplication::sendEvent( m_completionListBox, (QEvent*)e ); + return; + } + + // update the box + updateBox(); +} + +void KateCodeCompletion::doComplete() +{ + KateCompletionItem* item = static_cast( + m_completionListBox->item(m_completionListBox->currentItem())); + + if( item == 0 ) + return; + + QString text = item->m_entry.text; + QString currentLine = m_view->currentTextLine(); + int len = m_view->cursorColumnReal() - m_colCursor; + QString currentComplText = currentLine.mid(m_colCursor,len); + QString add = text.mid(currentComplText.length()); + if( item->m_entry.postfix == "()" ) + add += "("; + + emit filterInsertString(&(item->m_entry),&add); + m_view->insertText(add); + + complete( item->m_entry ); + m_view->setFocus(); +} + +void KateCodeCompletion::abortCompletion() +{ + m_completionPopup->hide(); + delete m_commentLabel; + m_commentLabel = 0; + emit completionAborted(); +} + +void KateCodeCompletion::complete( KTextEditor::CompletionEntry entry ) +{ + m_completionPopup->hide(); + delete m_commentLabel; + m_commentLabel = 0; + emit completionDone( entry ); + emit completionDone(); +} + +void KateCodeCompletion::updateBox( bool ) +{ + if( m_colCursor > m_view->cursorColumnReal() ) { + // the cursor is too far left + kdDebug(13035) << "Aborting Codecompletion after sendEvent" << endl; + kdDebug(13035) << m_view->cursorColumnReal() << endl; + abortCompletion(); + m_view->setFocus(); + return; + } + + m_completionListBox->clear(); + + QString currentLine = m_view->currentTextLine(); + int len = m_view->cursorColumnReal() - m_colCursor; + QString currentComplText = currentLine.mid(m_colCursor,len); +/* No-one really badly wants those, or? + kdDebug(13035) << "Column: " << m_colCursor << endl; + kdDebug(13035) << "Line: " << currentLine << endl; + kdDebug(13035) << "CurrentColumn: " << m_view->cursorColumnReal() << endl; + kdDebug(13035) << "Len: " << len << endl; + kdDebug(13035) << "Text: '" << currentComplText << "'" << endl; + kdDebug(13035) << "Count: " << m_complList.count() << endl; +*/ + QValueList::Iterator it; + if( m_caseSensitive ) { + for( it = m_complList.begin(); it != m_complList.end(); ++it ) { + if( (*it).text.startsWith(currentComplText) ) { + new KateCompletionItem(m_completionListBox,*it); + } + } + } else { + currentComplText = currentComplText.upper(); + for( it = m_complList.begin(); it != m_complList.end(); ++it ) { + if( (*it).text.upper().startsWith(currentComplText) ) { + new KateCompletionItem(m_completionListBox,*it); + } + } + } + + if( m_completionListBox->count() == 0 || + ( m_completionListBox->count() == 1 && // abort if we equaled the last item + currentComplText == m_completionListBox->text(0).stripWhiteSpace() ) ) { + abortCompletion(); + m_view->setFocus(); + return; + } + + kdDebug(13035)<<"KateCodeCompletion::updateBox: Resizing widget"<resize(m_completionListBox->sizeHint() + QSize(2,2)); + QPoint p = m_view->mapToGlobal( m_view->cursorCoordinates() ); + int x = p.x(); + int y = p.y() ; + if ( y + m_completionPopup->height() + m_view->renderer()->config()->fontMetrics( )->height() > QApplication::desktop()->height() ) + y -= (m_completionPopup->height() ); + else + y += m_view->renderer()->config()->fontMetrics( )->height(); + + if (x + m_completionPopup->width() > QApplication::desktop()->width()) + x = QApplication::desktop()->width() - m_completionPopup->width(); + + m_completionPopup->move( QPoint(x,y) ); + + m_completionListBox->setCurrentItem( 0 ); + m_completionListBox->setSelected( 0, true ); + m_completionListBox->setFocus(); + m_completionPopup->show(); + + QTimer::singleShot(0,this,SLOT(showComment())); +} + +void KateCodeCompletion::showArgHint ( QStringList functionList, const QString& strWrapping, const QString& strDelimiter ) +{ + unsigned int line, col; + m_view->cursorPositionReal( &line, &col ); + m_pArgHint->reset( line, col ); + m_pArgHint->setArgMarkInfos( strWrapping, strDelimiter ); + + int nNum = 0; + QStringList::Iterator end(functionList.end()); + for( QStringList::Iterator it = functionList.begin(); it != end; ++it ) + { + kdDebug(13035) << "Insert function text: " << *it << endl; + + m_pArgHint->addFunction( nNum, ( *it ) ); + + nNum++; + } + + m_pArgHint->move(m_view->mapToGlobal(m_view->cursorCoordinates() + QPoint(0,m_view->renderer()->config()->fontMetrics( )->height())) ); + m_pArgHint->show(); +} + +void KateCodeCompletion::slotCursorPosChanged() +{ + m_pArgHint->cursorPositionChanged ( m_view, m_view->cursorLine(), m_view->cursorColumnReal() ); +} + +void KateCodeCompletion::showComment() +{ + if (!m_completionPopup->isVisible()) + return; + + KateCompletionItem* item = static_cast(m_completionListBox->item(m_completionListBox->currentItem())); + + if( !item ) + return; + + if( item->m_entry.comment.isEmpty() ) + return; + + delete m_commentLabel; + m_commentLabel = new KateCodeCompletionCommentLabel( 0, item->m_entry.comment ); + m_commentLabel->setFont(QToolTip::font()); + m_commentLabel->setPalette(QToolTip::palette()); + + QPoint rightPoint = m_completionPopup->mapToGlobal(QPoint(m_completionPopup->width(),0)); + QPoint leftPoint = m_completionPopup->mapToGlobal(QPoint(0,0)); + QRect screen = QApplication::desktop()->screenGeometry ( m_commentLabel ); + QPoint finalPoint; + if (rightPoint.x()+m_commentLabel->width() > screen.x() + screen.width()) + finalPoint.setX(leftPoint.x()-m_commentLabel->width()); + else + finalPoint.setX(rightPoint.x()); + + m_completionListBox->ensureCurrentVisible(); + + finalPoint.setY( + m_completionListBox->viewport()->mapToGlobal(m_completionListBox->itemRect( + m_completionListBox->item(m_completionListBox->currentItem())).topLeft()).y()); + + m_commentLabel->move(finalPoint); + m_commentLabel->show(); +} + +KateArgHint::KateArgHint( KateView* parent, const char* name ) + : QFrame( parent, name, WType_Popup ) +{ + setBackgroundColor( black ); + setPaletteForegroundColor( Qt::black ); + + labelDict.setAutoDelete( true ); + layout = new QVBoxLayout( this, 1, 2 ); + layout->setAutoAdd( true ); + editorView = parent; + + m_markCurrentFunction = true; + + setFocusPolicy( StrongFocus ); + setFocusProxy( parent ); + + reset( -1, -1 ); +} + +KateArgHint::~KateArgHint() +{ +} + +void KateArgHint::setArgMarkInfos( const QString& wrapping, const QString& delimiter ) +{ + m_wrapping = wrapping; + m_delimiter = delimiter; + m_markCurrentFunction = true; +} + +void KateArgHint::reset( int line, int col ) +{ + m_functionMap.clear(); + m_currentFunction = -1; + labelDict.clear(); + + m_currentLine = line; + m_currentCol = col - 1; +} + +void KateArgHint::slotDone(bool completed) +{ + hide(); + + m_currentLine = m_currentCol = -1; + + emit argHintHidden(); + if (completed) + emit argHintCompleted(); + else + emit argHintAborted(); +} + +void KateArgHint::cursorPositionChanged( KateView* view, int line, int col ) +{ + if( m_currentCol == -1 || m_currentLine == -1 ){ + slotDone(false); + return; + } + + int nCountDelimiter = 0; + int count = 0; + + QString currentTextLine = view->doc()->textLine( line ); + QString text = currentTextLine.mid( m_currentCol, col - m_currentCol ); + QRegExp strconst_rx( "\"[^\"]*\"" ); + QRegExp chrconst_rx( "'[^']*'" ); + + text = text + .replace( strconst_rx, "\"\"" ) + .replace( chrconst_rx, "''" ); + + int index = 0; + while( index < (int)text.length() ){ + if( text[index] == m_wrapping[0] ){ + ++count; + } else if( text[index] == m_wrapping[1] ){ + --count; + } else if( count > 0 && text[index] == m_delimiter[0] ){ + ++nCountDelimiter; + } + ++index; + } + + if( (m_currentLine > 0 && m_currentLine != line) || (m_currentLine < col) || (count == 0) ){ + slotDone(count == 0); + return; + } + + // setCurArg ( nCountDelimiter + 1 ); + +} + +void KateArgHint::addFunction( int id, const QString& prot ) +{ + m_functionMap[ id ] = prot; + QLabel* label = new QLabel( prot.stripWhiteSpace().simplifyWhiteSpace(), this ); + label->setBackgroundColor( QColor(255, 255, 238) ); + label->show(); + labelDict.insert( id, label ); + + if( m_currentFunction < 0 ) + setCurrentFunction( id ); +} + +void KateArgHint::setCurrentFunction( int currentFunction ) +{ + if( m_currentFunction != currentFunction ){ + + if( currentFunction < 0 ) + currentFunction = (int)m_functionMap.size() - 1; + + if( currentFunction > (int)m_functionMap.size()-1 ) + currentFunction = 0; + + if( m_markCurrentFunction && m_currentFunction >= 0 ){ + QLabel* label = labelDict[ m_currentFunction ]; + label->setFont( font() ); + } + + m_currentFunction = currentFunction; + + if( m_markCurrentFunction ){ + QLabel* label = labelDict[ currentFunction ]; + QFont fnt( font() ); + fnt.setBold( true ); + label->setFont( fnt ); + } + + adjustSize(); + } +} + +void KateArgHint::show() +{ + QFrame::show(); + adjustSize(); +} + +bool KateArgHint::eventFilter( QObject*, QEvent* e ) +{ + if( isVisible() && e->type() == QEvent::KeyPress ){ + QKeyEvent* ke = static_cast( e ); + if( (ke->state() & ControlButton) && ke->key() == Key_Left ){ + setCurrentFunction( currentFunction() - 1 ); + ke->accept(); + return true; + } else if( ke->key() == Key_Escape ){ + slotDone(false); + return false; + } else if( (ke->state() & ControlButton) && ke->key() == Key_Right ){ + setCurrentFunction( currentFunction() + 1 ); + ke->accept(); + return true; + } + } + + return false; +} + +void KateArgHint::adjustSize( ) +{ + QRect screen = QApplication::desktop()->screenGeometry( pos() ); + + QFrame::adjustSize(); + if( width() > screen.width() ) + resize( screen.width(), height() ); + + if( x() + width() > screen.x() + screen.width() ) + move( screen.x() + screen.width() - width(), y() ); +} + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katecodecompletion.h b/kate/part/katecodecompletion.h new file mode 100644 index 000000000..81279d929 --- /dev/null +++ b/kate/part/katecodecompletion.h @@ -0,0 +1,164 @@ +/* This file is part of the KDE libraries + + Copyright (C) 2001 Joseph Wenninger + Copyright (C) 2002 John Firebaugh + Copyright (C) 2001 by Victor Röder + Copyright (C) 2002 by Roberto Raggi + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +/******** Partly based on the ArgHintWidget of Qt3 by Trolltech AS *********/ +/* Trolltech doesn't mind, if we license that piece of code as LGPL, because there isn't much + * left from the desigener code */ + + +#ifndef __KateCodeCompletion_H__ +#define __KateCodeCompletion_H__ + +#include + +#include +#include +#include +#include +#include +#include + +class KateView; +class KateArgHint; +class KateCCListBox; + +class QLayout; +class QVBox; + +class KateCodeCompletionCommentLabel : public QLabel +{ + Q_OBJECT + + public: + KateCodeCompletionCommentLabel( QWidget* parent, const QString& text) : QLabel( parent, "toolTipTip", + WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ) + { + setMargin(1); + setIndent(0); + setAutoMask( false ); + setFrameStyle( QFrame::Plain | QFrame::Box ); + setLineWidth( 1 ); + setAlignment( AlignAuto | AlignTop ); + polish(); + setText(text); + adjustSize(); + } +}; + +class KateCodeCompletion : public QObject +{ + Q_OBJECT + + friend class KateViewInternal; + + public: + KateCodeCompletion(KateView *view); + ~KateCodeCompletion(); + + bool codeCompletionVisible (); + + void showArgHint( + QStringList functionList, const QString& strWrapping, const QString& strDelimiter ); + void showCompletionBox( + QValueList entries, int offset = 0, bool casesensitive = true ); + bool eventFilter( QObject* o, QEvent* e ); + + void handleKey (QKeyEvent *e); + + public slots: + void slotCursorPosChanged(); + void showComment(); + void updateBox () { updateBox(false); } + + signals: + void completionAborted(); + void completionDone(); + void argHintHidden(); + void completionDone(KTextEditor::CompletionEntry); + void filterInsertString(KTextEditor::CompletionEntry*,QString *); + + private: + void doComplete(); + void abortCompletion(); + void complete( KTextEditor::CompletionEntry ); + void updateBox( bool newCoordinate ); + + KateArgHint* m_pArgHint; + KateView* m_view; + QVBox* m_completionPopup; + KateCCListBox* m_completionListBox; + QValueList m_complList; + uint m_lineCursor; + uint m_colCursor; + int m_offset; + bool m_caseSensitive; + KateCodeCompletionCommentLabel* m_commentLabel; +}; + +class KateArgHint: public QFrame +{ + Q_OBJECT + + public: + KateArgHint( KateView* =0, const char* =0 ); + virtual ~KateArgHint(); + + virtual void setCurrentFunction( int ); + virtual int currentFunction() const { return m_currentFunction; } + + void setArgMarkInfos( const QString&, const QString& ); + + virtual void addFunction( int, const QString& ); + QString functionAt( int id ) const { return m_functionMap[ id ]; } + + virtual void show(); + virtual void adjustSize(); + virtual bool eventFilter( QObject*, QEvent* ); + + signals: + void argHintHidden(); + void argHintCompleted(); + void argHintAborted(); + + public slots: + virtual void reset( int, int ); + virtual void cursorPositionChanged( KateView*, int, int ); + + private slots: + void slotDone(bool completed); + + private: + QMap m_functionMap; + int m_currentFunction; + QString m_wrapping; + QString m_delimiter; + bool m_markCurrentFunction; + int m_currentLine; + int m_currentCol; + KateView* editorView; + QIntDict labelDict; + QLayout* layout; +}; + +#endif + +// kate: space-indent on; indent-width 2; replace-tabs on; diff --git a/kate/part/katecodefoldinghelpers.cpp b/kate/part/katecodefoldinghelpers.cpp new file mode 100644 index 000000000..49090820b --- /dev/null +++ b/kate/part/katecodefoldinghelpers.cpp @@ -0,0 +1,1662 @@ +/* This file is part of the KDE libraries + Copyright (C) 2002 Joseph Wenninger + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License version 2 as published by the Free Software Foundation. + + 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "katecodefoldinghelpers.h" +#include "katecodefoldinghelpers.moc" + +#include "katebuffer.h" +#include "katecursor.h" +#include + +#include + +#define JW_DEBUG 0 + +bool KateCodeFoldingTree::trueVal = true; + +KateCodeFoldingNode::KateCodeFoldingNode() : + parentNode(0), + startLineRel(0), + endLineRel(0), + startCol(0), + endCol(0), + startLineValid(false), + endLineValid(false), + type(0), + visible(true), + deleteOpening(false), + deleteEnding(false) +{ +}//the endline fields should be initialised to not valid + +KateCodeFoldingNode::KateCodeFoldingNode(KateCodeFoldingNode *par, signed char typ, unsigned int sLRel): + parentNode(par), + startLineRel(sLRel), + endLineRel(10000), + startCol(0), + endCol(0), + startLineValid(true), + endLineValid(false), + type(typ), + visible(true), + deleteOpening(false), + deleteEnding(false) +{ +}//the endline fields should be initialised to not valid + +KateCodeFoldingNode::~KateCodeFoldingNode() +{ + // delete all child nodes + clearChildren (); +} + +bool KateCodeFoldingNode::getBegin(KateCodeFoldingTree *tree, KateTextCursor* begin) { + if (!startLineValid) return false; + unsigned int line=startLineRel; + for (KateCodeFoldingNode *n=parentNode;n;n=n->parentNode) + line+=n->startLineRel; + + tree->m_buffer->codeFoldingColumnUpdate(line); + begin->setLine(line); + begin->setCol(startCol); + + return true; +} + +bool KateCodeFoldingNode::getEnd(KateCodeFoldingTree *tree, KateTextCursor *end) { + if (!endLineValid) return false; + unsigned int line=startLineRel+endLineRel; + for (KateCodeFoldingNode *n=parentNode;n;n=n->parentNode) + line+=n->startLineRel; + + tree->m_buffer->codeFoldingColumnUpdate(line); + end->setLine(line); + end->setCol(endCol); + + return true; +} + +int KateCodeFoldingNode::cmpPos(KateCodeFoldingTree *tree, uint line,uint col) { + KateTextCursor cur(line,col); + KateTextCursor start,end; + kdDebug(13000)<<"KateCodeFoldingNode::cmpPos (1)"<cur)?-1:0); + } + if ((!startValid) && endValid) { + return ((cur>end)?1:0); + } + //here both have to be valid, both invalid must not happen + Q_ASSERT(startValid && endValid); + return ( (curend) ? 1:0)); +} + +void KateCodeFoldingNode::insertChild (uint index, KateCodeFoldingNode *node) +{ + uint s = m_children.size (); + + if (index > s) + return; + + m_children.resize (++s); + + for (uint i=s-1; i > index; --i) + m_children[i] = m_children[i-1]; + + m_children[index] = node; +} + +KateCodeFoldingNode *KateCodeFoldingNode::takeChild (uint index) +{ + uint s = m_children.size (); + + if (index >= s) + return 0; + + KateCodeFoldingNode *n = m_children[index]; + + for (uint i=index; (i+1) < s; ++i) + m_children[i] = m_children[i+1]; + + m_children.resize (s-1); + + return n; +} + +void KateCodeFoldingNode::clearChildren () +{ + for (uint i=0; i < m_children.size(); ++i) + delete m_children[i]; + + m_children.resize (0); +} + +KateCodeFoldingTree::KateCodeFoldingTree(KateBuffer *buffer): QObject(buffer), m_buffer (buffer) +{ + clear(); +} + +void KateCodeFoldingTree::fixRoot(int endLRel) +{ + m_root.endLineRel = endLRel; +} + +void KateCodeFoldingTree::clear() +{ + m_root.clearChildren(); + + // initialize the root "special" node + m_root.startLineValid=true; + m_root.endLineValid=true; // temporary, should be false; + m_root.endLineRel=1; // temporary; + + hiddenLinesCountCacheValid=false; + lineMapping.setAutoDelete(true); + hiddenLines.clear(); + lineMapping.clear(); + nodesForLine.clear(); + markedForDeleting.clear(); + dontIgnoreUnchangedLines.clear(); +} + +KateCodeFoldingTree::~KateCodeFoldingTree() +{ +} + +bool KateCodeFoldingTree::isTopLevel(unsigned int line) +{ + if (m_root.noChildren()) + return true; // no childs + + // look if a given lines belongs to a sub node + for ( uint i=0; i < m_root.childCount(); ++i ) + { + KateCodeFoldingNode *node = m_root.child(i); + + if ((node->startLineRel<=line) && (line<=node->startLineRel+node->endLineRel)) + return false; // the line is within the range of a subnode -> return toplevel=false + } + + return true; // the root node is the only node containing the given line, return toplevel=true +} + +void KateCodeFoldingTree::getLineInfo(KateLineInfo *info, unsigned int line) +{ + // Initialze the returned structure, this will also be returned if the root node has no child nodes + // or the line is not within a childnode's range. + info->topLevel = true; + info->startsVisibleBlock = false; + info->startsInVisibleBlock = false; + info->endsBlock = false; + info->invalidBlockEnd = false; + + if (m_root.noChildren()) + return; + + //let's look for some information + for ( uint i=0; i < m_root.childCount(); ++i ) + { + KateCodeFoldingNode *node = m_root.child(i); + + if ((node->startLineRel<=line) && (line<=node->startLineRel+node->endLineRel)) // we found a node, which contains the given line -> do a complete lookup + { + info->topLevel = false; //we are definitly not toplevel + findAllNodesOpenedOrClosedAt(line); //lookup all nodes, which start or and at the given line + + for ( KateCodeFoldingNode *node = nodesForLine.first(); node; node = nodesForLine.next() ) + { + uint startLine = getStartLine(node); + + // type<0 means, that a region has been closed, but not opened + // eg. parantheses missmatch + if (node->type < 0) + info->invalidBlockEnd=true; + else + { + if (startLine != line) // does the region we look at not start at the given line + info->endsBlock = true; // than it has to be an ending + else + { + // The line starts a new region, now determine, if it's a visible or a hidden region + if (node->visible) + info->startsVisibleBlock=true; + else + info->startsInVisibleBlock=true; + } + } + } + + return; + } + } + + return; +} + + +KateCodeFoldingNode *KateCodeFoldingTree::findNodeForLine(unsigned int line) +{ + if (m_root.noChildren()) // does we have child list + nodes ? + return &m_root; + + // lets look, if given line is within a subnode range, and then return the deepest one. + for ( uint i=0; i < m_root.childCount(); ++i ) + { + KateCodeFoldingNode *node = m_root.child(i); + + if ((node->startLineRel<=line) && (line<=node->startLineRel+node->endLineRel)) + { + // a region surounds the line, look in the next deeper hierarchy step + return findNodeForLineDescending(node,line,0); + } + } + + return &m_root; +} + + +KateCodeFoldingNode *KateCodeFoldingTree::findNodeForLineDescending ( KateCodeFoldingNode *node, + unsigned int line, unsigned int offset, bool oneStepOnly ) +{ + if (node->noChildren()) + return node; + + // calculate the offset, between a subnodes real start line and its relative start + offset += node->startLineRel; + + for ( uint i=0; i < node->childCount(); ++i ) + { + KateCodeFoldingNode *subNode = node->child(i); + + if ((subNode->startLineRel+offset<=line) && (line<=subNode->endLineRel+subNode->startLineRel+offset)) //warning fix me for invalid ends + { + // a subnode contains the line. + // if oneStepOnly is true, we don't want to search for the deepest node, just return the found one + + if (oneStepOnly) + return subNode; + else + return findNodeForLineDescending (subNode,line,offset); // look into the next deeper hierarchy step + } + } + + return node; // the current node has no sub nodes, or the line couldn'te be found within a subregion +} + +KateCodeFoldingNode *KateCodeFoldingTree::findNodeForPosition(unsigned int line, unsigned int column) +{ + KateCodeFoldingNode *node=findNodeForLine(line); + + if (node==&m_root) return &m_root; + + kdDebug(13000)<<"initial cmpPos"<cmpPos(this, line,column); + while (true) { + switch (leq) { + case 0: { + if (node->noChildren()) + return node; + else + { + tmp=node; + for ( uint i=0; i < node->childCount(); ++i ) + { + KateCodeFoldingNode *subNode = node->child(i); + kdDebug(13000)<<"cmdPos(case0):calling"<cmpPos(this, line,column); + kdDebug(13000)<<"cmdPos(case0):returned"<parentNode)) return &m_root; + kdDebug(13000)<<"current node type"<type<parentNode; + kdDebug(13000)<<"cmdPos(case-1/1):calling:"<cmpPos(this, line,column); + kdDebug(13000)<<"cmdPos(case-1/1):returned"<type).arg(node->startLineValid).arg(node->startLineRel).arg(node->endLineValid). + arg(node->endLineRel).arg(node->visible)<noChildren()) + return; + + QString newprefix(prefix + " "); + for ( uint i=0; i < node->childCount(); ++i ) + dumpNode (node->child(i),newprefix); +} + +/* + That's one of the most important functions ;) +*/ +void KateCodeFoldingTree::updateLine(unsigned int line, + QMemArray *regionChanges, bool *updated,bool changed,bool colsChanged) +{ + if ( (!changed) || colsChanged) + { + if (dontIgnoreUnchangedLines.isEmpty()) + return; + + if (dontIgnoreUnchangedLines[line]) + dontIgnoreUnchangedLines.remove(line); + else + return; + } + + something_changed = false; + + findAndMarkAllNodesforRemovalOpenedOrClosedAt(line); + + if (regionChanges->isEmpty()) + { + // KateCodeFoldingNode *node=findNodeForLine(line); + // if (node->type!=0) + // if (getStartLine(node)+node->endLineRel==line) removeEnding(node,line); + } + else + { + for (unsigned int i=0;isize() / 4;i++) + { + signed char tmp=(*regionChanges)[regionChanges->size()-2-i*2]; + uint tmppos=(*regionChanges)[regionChanges->size()-1-i*2]; + (*regionChanges)[regionChanges->size()-2-i*2]=(*regionChanges)[i*2]; + (*regionChanges)[regionChanges->size()-1-i*2]=(*regionChanges)[i*2+1]; + (*regionChanges)[i*2]=tmp; + (*regionChanges)[i*2+1]=tmppos; + } + + + signed char data= (*regionChanges)[regionChanges->size()-2]; + uint charPos=(*regionChanges)[regionChanges->size()-1]; + regionChanges->resize (regionChanges->size()-2); + + int insertPos=-1; + KateCodeFoldingNode *node = findNodeForLine(line); + + if (data<0) + { + // if (insertPos==-1) + { + unsigned int tmpLine=line-getStartLine(node); + + for ( uint i=0; i < node->childCount(); ++i ) + { + if (node->child(i)->startLineRel >= tmpLine) + { + insertPos=i; + break; + } + } + } + } + else + { + for (; (node->parentNode) && (getStartLine(node->parentNode)==line) && (node->parentNode->type!=0); node=node->parentNode); + + if ((getStartLine(node)==line) && (node->type!=0)) + { + insertPos=node->parentNode->findChild(node); + node = node->parentNode; + } + else + { + for ( uint i=0; i < node->childCount(); ++i ) + { + if (getStartLine(node->child(i))>=line) + { + insertPos=i; + break; + } + } + } + } + + do + { + if (data<0) + { + if (correctEndings(data,node,line,charPos,insertPos)) + { + insertPos=node->parentNode->findChild(node)+1; + node=node->parentNode; + } + else + { + if (insertPos!=-1) insertPos++; + } + } + else + { + int startLine=getStartLine(node); + if ((insertPos==-1) || (insertPos>=(int)node->childCount())) + { + KateCodeFoldingNode *newNode = new KateCodeFoldingNode (node,data,line-startLine); + something_changed = true; + node->appendChild(newNode); + addOpening(newNode, data, regionChanges, line,charPos); + insertPos = node->findChild(newNode)+1; + } + else + { + if (node->child(insertPos)->startLineRel == line-startLine) + { + addOpening(node->child(insertPos), data, regionChanges, line,charPos); + insertPos++; + } + else + { +// kdDebug(13000)<<"ADDING NODE "<insertChild(insertPos, newNode); + addOpening(newNode, data, regionChanges, line,charPos); + insertPos++; + } + } + } + + if (regionChanges->isEmpty()) + data = 0; + else + { + data = (*regionChanges)[regionChanges->size()-2]; + charPos=(*regionChanges)[regionChanges->size()-1]; + regionChanges->resize (regionChanges->size()-2); + } + } while (data!=0); + } + + cleanupUnneededNodes(line); +// if (something_changed) emit regionBeginEndAddedRemoved(line); + (*updated) = something_changed; +} + + +bool KateCodeFoldingTree::removeOpening(KateCodeFoldingNode *node,unsigned int line) +{ + signed char type; + if ((type=node->type) == 0) + { + dontDeleteOpening(node); + dontDeleteEnding(node); + return false; + } + + if (!node->visible) + { + toggleRegionVisibility(getStartLine(node)); + } + + KateCodeFoldingNode *parent = node->parentNode; + int mypos = parent->findChild(node); + + if (mypos > -1) + { + //move childnodes() up + for(; node->childCount()>0 ;) + { + KateCodeFoldingNode *tmp; + parent->insertChild(mypos, tmp=node->takeChild(0)); + tmp->parentNode = parent; + tmp->startLineRel += node->startLineRel; + mypos++; + } + + // remove the node + //mypos = parent->findChild(node); + bool endLineValid = node->endLineValid; + int endLineRel = node->endLineRel; + uint endCol=node->endCol; + + // removes + deletes + KateCodeFoldingNode *child = parent->takeChild(mypos); + markedForDeleting.removeRef(child); + delete child; + + if ((type>0) && (endLineValid)) + correctEndings(-type, parent, line+endLineRel/*+1*/,endCol, mypos); // why the hell did I add a +1 here ? + } + + return true; +} + +bool KateCodeFoldingTree::removeEnding(KateCodeFoldingNode *node,unsigned int /* line */) +{ + KateCodeFoldingNode *parent = node->parentNode; + + if (!parent) + return false; + + if (node->type == 0) + return false; + + if (node->type < 0) + { + // removes + deletes + int i = parent->findChild (node); + if (i >= 0) + { + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeRef(child); + delete child; + } + + return true; + } + + int mypos = parent->findChild(node); + int count = parent->childCount(); + + for (int i=mypos+1; ichild(i)->type == -node->type) + { + node->endLineValid = true; + node->endLineRel = parent->child(i)->startLineRel - node->startLineRel; + + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeRef(child); + delete child; + + count = i-mypos-1; + if (count > 0) + { + for (int i=0; itakeChild(mypos+1); + tmp->startLineRel -= node->startLineRel; + tmp->parentNode = node; //should help 16.04.2002 + node->appendChild(tmp); + } + } + return false; + } + } + + if ( (parent->type == node->type) || /*temporary fix */ (!parent->parentNode)) + { + for (int i=mypos+1; i<(int)parent->childCount(); i++) + { + KateCodeFoldingNode *tmp = parent->takeChild(mypos+1); + tmp->startLineRel -= node->startLineRel; + tmp->parentNode = node; // SHOULD HELP 16.04.2002 + node->appendChild(tmp); + } + + // this should fix the bug of wrongly closed nodes + if (!parent->parentNode) + node->endLineValid=false; + else + node->endLineValid = parent->endLineValid; + + node->endLineRel = parent->endLineRel-node->startLineRel; + + if (node->endLineValid) + return removeEnding(parent, getStartLine(parent)+parent->endLineRel); + + return false; + } + + node->endLineValid = false; + node->endLineRel = parent->endLineRel - node->startLineRel; + + return false; +} + + +bool KateCodeFoldingTree::correctEndings(signed char data, KateCodeFoldingNode *node,unsigned int line,unsigned int endCol,int insertPos) +{ +// if (node->type==0) {kdError()<<"correct Ending should never be called with the root node"<type) + { +#if JW_DEBUG + kdDebug(13000)<<"data!=-node->type (correctEndings)"< add to unopend list + dontDeleteEnding(node); + if (data == node->type) { + node->endCol=endCol; + return false; + } + KateCodeFoldingNode *newNode = new KateCodeFoldingNode (node,data,line-startLine); + something_changed = true; + newNode->startLineValid = false; + newNode->endLineValid = true; + newNode->endLineRel = 0; + newNode->endCol=endCol; + + if ((insertPos==-1) || (insertPos==(int)node->childCount())) + node->appendChild(newNode); + else + node->insertChild(insertPos,newNode); + + // find correct position + return false; + } + else + { + something_changed = true; + dontDeleteEnding(node); + + // valid closing region + if (!node->endLineValid) + { + node->endLineValid = true; + node->endLineRel = line - startLine; + node->endCol=endCol; + //moving + + moveSubNodesUp(node); + } + else + { +#if JW_DEBUG + kdDebug(13000)<<"Closing a node which had already a valid end"<endLineRel == line) + { + node->endCol=endCol; + // we won, just skip +#if JW_DEBUG + kdDebug(13000)<< "We won, just skipping (correctEndings)"<endLineRel+startLine; + uint bakEndCol = node->endCol; + node->endLineRel = line-startLine; + node->endCol=endCol; + +#if JW_DEBUG + kdDebug(13000)<< "reclosed node had childnodes()"<parentNode) + { + correctEndings(data,node->parentNode,bakEndLine, bakEndCol,node->parentNode->findChild(node)+1); // ???? + } + else + { + //add to unopened list (bakEndLine) + } + } + } + } + return true; +} + +void KateCodeFoldingTree::moveSubNodesUp(KateCodeFoldingNode *node) +{ + int mypos = node->parentNode->findChild(node); + int removepos=-1; + int count = node->childCount(); + for (int i=0; ichild(i)->startLineRel >= node->endLineRel) + { + removepos=i; + break; + } +#if JW_DEBUG + kdDebug(13000)<-1) + { +#if JW_DEBUG + kdDebug(13000)<<"Children need to be moved"<parentNode->childCount()-1) + { + while (removepos<(int)node->childCount()) + { + node->parentNode->appendChild(moveNode=node->takeChild(removepos)); + moveNode->parentNode = node->parentNode; + moveNode->startLineRel += node->startLineRel; + } + } + else + { + int insertPos=mypos; + while (removepos < (int)node->childCount()) + { + insertPos++; + node->parentNode->insertChild(insertPos, moveNode=node->takeChild(removepos)); + moveNode->parentNode = node->parentNode; // That should solve a crash + moveNode->startLineRel += node->startLineRel; + } + } + } + +} + + + +void KateCodeFoldingTree::addOpening(KateCodeFoldingNode *node,signed char nType, QMemArray* list,unsigned int line,unsigned int charPos) +{ + uint startLine = getStartLine(node); + if ((startLine==line) && (node->type!=0)) + { +#if JW_DEBUG + kdDebug(13000)<<"startLine equals line"<type) + { +#if JW_DEBUG + kdDebug(13000)<<"Node exists"<deleteOpening = false; + node->startCol=charPos; + KateCodeFoldingNode *parent = node->parentNode; + + if (!node->endLineValid) + { + int current = parent->findChild(node); + int count = parent->childCount()-(current+1); + node->endLineRel = parent->endLineRel - node->startLineRel; + +// EXPERIMENTAL TEST BEGIN +// move this afte the test for unopened, but closed regions within the parent node, or if there are no siblings, bubble up + if (parent) + if (parent->type == node->type) + { + if (parent->endLineValid) + { + removeEnding(parent, line); + node->endLineValid = true; + } + } + +// EXPERIMENTAL TEST BEGIN + + if (current != (int)parent->childCount()-1) + { + //search for an unopened but closed region, even if the parent is of the same type +#ifdef __GNUC__ +#warning "FIXME: why does this seem to work?" +#endif +// if (node->type != parent->type) + { + for (int i=current+1; i<(int)parent->childCount(); i++) + { + if (parent->child(i)->type == -node->type) + { + count = (i-current-1); + node->endLineValid = true; + node->endLineRel = getStartLine(parent->child(i))-line; + node->endCol = parent->child(i)->endCol; + KateCodeFoldingNode *child = parent->takeChild(i); + markedForDeleting.removeRef( child ); + delete child; + break; + } + } + } +// else +// { +// parent->endLineValid = false; +// parent->endLineRel = 20000; +// } + + if (count>0) + { + for (int i=0;iappendChild(tmp=parent->takeChild(current+1)); + tmp->startLineRel -= node->startLineRel; + tmp->parentNode = node; + } + } + } + + } + + addOpening_further_iterations(node, nType, list, line, 0, startLine,node->startCol); + + } //else ohoh, much work to do same line, but other region type + } + else + { // create a new region + KateCodeFoldingNode *newNode = new KateCodeFoldingNode (node,nType,line-startLine); + something_changed = true; + + int insert_position=-1; + for (int i=0; i<(int)node->childCount(); i++) + { + if (startLine+node->child(i)->startLineRel > line) + { + insert_position=i; + break; + } + } + + int current; + if (insert_position==-1) + { + node->appendChild(newNode); + current = node->childCount()-1; + } + else + { + node->insertChild(insert_position, newNode); + current = insert_position; + } + +// if (node->type==newNode->type) +// { +// newNode->endLineValid=true; +// node->endLineValid=false; +// newNode->endLineRel=node->endLineRel-newNode->startLineRel; +// node->endLineRel=20000; //FIXME + + int count = node->childCount() - (current+1); + newNode->endLineRel -= newNode->startLineRel; + if (current != (int)node->childCount()-1) + { + if (node->type != newNode->type) + { + for (int i=current+1; i<(int)node->childCount(); i++) + { + if (node->child(i)->type == -newNode->type) + { + count = node->childCount() - i - 1; + newNode->endLineValid = true; + newNode->endLineRel = line - getStartLine(node->child(i)); + KateCodeFoldingNode *child = node->takeChild(i); + markedForDeleting.removeRef( child ); + delete child; + break; + } + } + } + else + { + node->endLineValid = false; + node->endLineRel = 10000; + } + if (count > 0) + { + for (int i=0;iappendChild(tmp=node->takeChild(current+1)); + tmp->parentNode=newNode; + } + } +// } + } + + addOpening(newNode, nType, list, line,charPos); + + addOpening_further_iterations(node, node->type, list, line, current, startLine,node->startCol); + } +} + + +void KateCodeFoldingTree::addOpening_further_iterations(KateCodeFoldingNode *node,signed char /* nType */, QMemArray* + list,unsigned int line,int current, unsigned int startLine,unsigned int charPos) +{ + while (!(list->isEmpty())) + { + if (list->isEmpty()) + return; + else + { + signed char data = (*list)[list->size()-2]; + uint charPos=(*list)[list->size()-1]; + list->resize (list->size()-2); + + if (data<0) + { +#if JW_DEBUG + kdDebug(13000)<<"An ending was found"<endLineValid) + { + if (node->endLineRel+startLine==line) // We've won again + { + //handle next node; + } + else + { // much moving + node->endLineRel=line-startLine; + node->endLineValid=true; + } + return; // next higher level should do the rest + } + else + { + node->endLineRel=line-startLine; + node->endLineValid=true; + //much moving + } + } //else add to unopened list +#endif + } + else + { + bool needNew = true; + if (current < (int)node->childCount()) + { + if (getStartLine(node->child(current)) == line) + needNew=false; + } + if (needNew) + { + something_changed = true; + KateCodeFoldingNode *newNode = new KateCodeFoldingNode(node, data, line-startLine); + node->insertChild(current, newNode); //find the correct position later + } + + addOpening(node->child(current), data, list, line,charPos); + current++; + //lookup node or create subnode + } + } + } // end while +} + +unsigned int KateCodeFoldingTree::getStartLine(KateCodeFoldingNode *node) +{ + unsigned int lineStart=0; + for (KateCodeFoldingNode *iter=node; iter->type != 0; iter=iter->parentNode) + lineStart += iter->startLineRel; + + return lineStart; +} + + +void KateCodeFoldingTree::lineHasBeenRemoved(unsigned int line) +{ + lineMapping.clear(); + dontIgnoreUnchangedLines.insert(line, &trueVal); + dontIgnoreUnchangedLines.insert(line-1, &trueVal); + dontIgnoreUnchangedLines.insert(line+1, &trueVal); + hiddenLinesCountCacheValid = false; +#if JW_DEBUG + kdDebug(13000)<endLineValid) + { + int startLine = getStartLine(node); + if (startLine == (int)line) + node->startLineRel--; + else + { + if (node->endLineRel == 0) + node->endLineValid = false; + node->endLineRel--; + } + + int count = node->childCount(); + for (int i=0; ichild(i)->startLineRel+startLine >= line) + node->child(i)->startLineRel--; + } + } + + if (node->parentNode) + decrementBy1(node->parentNode, node); + + for (QValueList::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it) + { + if ((*it).start > line) + (*it).start--; + else if ((*it).start+(*it).length > line) + (*it).length--; + } +} + + +void KateCodeFoldingTree::decrementBy1(KateCodeFoldingNode *node, KateCodeFoldingNode *after) +{ + if (node->endLineRel == 0) + node->endLineValid = false; + node->endLineRel--; + + for (uint i=node->findChild(after)+1; i < node->childCount(); ++i) + node->child(i)->startLineRel--; + + if (node->parentNode) + decrementBy1(node->parentNode,node); +} + + +void KateCodeFoldingTree::lineHasBeenInserted(unsigned int line) +{ + lineMapping.clear(); + dontIgnoreUnchangedLines.insert(line, &trueVal); + dontIgnoreUnchangedLines.insert(line-1, &trueVal); + dontIgnoreUnchangedLines.insert(line+1, &trueVal); + hiddenLinesCountCacheValid = false; +//return; +#if JW_DEBUG + kdDebug(13000)<endLineValid) + { + int startLine=getStartLine(node); + if (node->type < 0) + node->startLineRel++; + else + node->endLineRel++; + + for (uint i=0; i < node->childCount(); ++i) + { + KateCodeFoldingNode *iter = node->child(i); + + if (iter->startLineRel+startLine >= line) + iter->startLineRel++; + } + } + + if (node->parentNode) + incrementBy1(node->parentNode, node); + + for (QValueList::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it) + { + if ((*it).start > line) + (*it).start++; + else if ((*it).start+(*it).length > line) + (*it).length++; + } +} + +void KateCodeFoldingTree::incrementBy1(KateCodeFoldingNode *node, KateCodeFoldingNode *after) +{ + node->endLineRel++; + + for (uint i=node->findChild(after)+1; i < node->childCount(); ++i) + node->child(i)->startLineRel++; + + if (node->parentNode) + incrementBy1(node->parentNode,node); +} + + +void KateCodeFoldingTree::findAndMarkAllNodesforRemovalOpenedOrClosedAt(unsigned int line) +{ +#ifdef __GNUC__ +#warning "FIXME: make this multiple region changes per line save"; +#endif +// return; + markedForDeleting.clear(); + KateCodeFoldingNode *node = findNodeForLine(line); + if (node->type == 0) + return; + + addNodeToRemoveList(node, line); + + while (((node->parentNode) && (node->parentNode->type!=0)) && (getStartLine(node->parentNode)==line)) + { + node = node->parentNode; + addNodeToRemoveList(node, line); + } +#if JW_DEBUG + kdDebug(13000)<<" added line to markedForDeleting list"<startLineValid)) + { + add=true; + node->deleteOpening = true; + } + if ((startLine+node->endLineRel==line) || ((node->endLineValid==false) && (node->deleteOpening))) + { + int myPos=node->parentNode->findChild(node); // this has to be implemented nicely + if ((int)node->parentNode->childCount()>myPos+1) + addNodeToRemoveList(node->parentNode->child(myPos+1),line); + add=true; + node->deleteEnding = true; + } + + if(add) + markedForDeleting.append(node); + +} + + +void KateCodeFoldingTree::findAllNodesOpenedOrClosedAt(unsigned int line) +{ + nodesForLine.clear(); + KateCodeFoldingNode *node = findNodeForLine(line); + if (node->type == 0) + return; + + unsigned int startLine = getStartLine(node); + if (startLine == line) + nodesForLine.append(node); + else if ((startLine+node->endLineRel == line)) + nodesForLine.append(node); + + while (node->parentNode) + { + addNodeToFoundList(node->parentNode, line, node->parentNode->findChild(node)); + node = node->parentNode; + } +#if JW_DEBUG + kdDebug(13000)<<" added line to nodesForLine list"<type!=0)) + nodesForLine.append(node); + else if ((startLine+node->endLineRel==line) && (node->type!=0)) + nodesForLine.append(node); + + for (int i=childpos+1; i<(int)node->childCount(); i++) + { + KateCodeFoldingNode *child = node->child(i); + + if (startLine+child->startLineRel == line) + { + nodesForLine.append(child); + addNodeToFoundList(child, line, 0); + } + else + break; + } +} + + +void KateCodeFoldingTree::cleanupUnneededNodes(unsigned int line) +{ +#if JW_DEBUG + kdDebug(13000)<<"void KateCodeFoldingTree::cleanupUnneededNodes(unsigned int line)"<deleteOpening) + kdDebug(13000)<<"DELETE OPENING SET"<deleteEnding) + kdDebug(13000)<<"DELETE ENDING SET"<deleteOpening) && (node->deleteEnding)) + { +#if JW_DEBUG + kdDebug(13000)<<"Deleting complete node"<endLineValid) // just delete it, it has been opened and closed on this line + { + int f = node->parentNode->findChild (node); + + if (f >= 0) + delete node->parentNode->takeChild(f); + } + else + { + removeOpening(node, line); + // the node has subnodes which need to be moved up and this one has to be deleted + } + something_changed = true; + } + else + { + if ((node->deleteOpening) && (node->startLineValid)) + { +#if JW_DEBUG + kdDebug(13000)<<"calling removeOpening"<deleteEnding) && (node->endLineValid)) + { + dontDeleteEnding(node); + removeEnding(node, line); + something_changed = true; + } + else + dontDeleteEnding(node); + } + } + } +} + +void KateCodeFoldingTree::dontDeleteEnding(KateCodeFoldingNode* node) +{ + node->deleteEnding = false; +} + + +void KateCodeFoldingTree::dontDeleteOpening(KateCodeFoldingNode* node) +{ + node->deleteOpening = false; +} + + +void KateCodeFoldingTree::toggleRegionVisibility(unsigned int line) +{ + // hl whole file + m_buffer->line (m_buffer->count()-1); + + lineMapping.clear(); + hiddenLinesCountCacheValid = false; + kdDebug(13000)<startLineValid) || (getStartLine(node) != line) ) + { + nodesForLine.remove(i); + i--; + } + } + + if (nodesForLine.isEmpty()) + return; + + nodesForLine.at(0)->visible = !nodesForLine.at(0)->visible; + + if (!nodesForLine.at(0)->visible) + addHiddenLineBlock(nodesForLine.at(0),line); + else + { + for (QValueList::Iterator it=hiddenLines.begin(); it!=hiddenLines.end();++it) + if ((*it).start == line+1) + { + hiddenLines.remove(it); + break; + } + + updateHiddenSubNodes(nodesForLine.at(0)); + } + + emit regionVisibilityChangedAt(line); +} + +void KateCodeFoldingTree::updateHiddenSubNodes(KateCodeFoldingNode *node) +{ + for (uint i=0; i < node->childCount(); ++i) + { + KateCodeFoldingNode *iter = node->child(i); + + if (!iter->visible) + addHiddenLineBlock(iter, getStartLine(iter)); + else + updateHiddenSubNodes(iter); + } +} + +void KateCodeFoldingTree::addHiddenLineBlock(KateCodeFoldingNode *node,unsigned int line) +{ + KateHiddenLineBlock data; + data.start = line+1; + data.length = node->endLineRel-(existsOpeningAtLineAfter(line+node->endLineRel,node)?1:0); // without -1; + bool inserted = false; + + for (QValueList::Iterator it=hiddenLines.begin(); it!=hiddenLines.end(); ++it) + { + if (((*it).start>=data.start) && ((*it).start<=data.start+data.length-1)) // another hidden block starting at the within this block already exits -> adapt new block + { + // the existing block can't have lines behind the new one, because a newly hidden + // block has to encapsulate already hidden ones + it=hiddenLines.remove(it); + --it; + } + else + { + if ((*it).start > line) + { + hiddenLines.insert(it, data); + inserted = true; + + break; + } + } + } + + if (!inserted) + hiddenLines.append(data); +} + +bool KateCodeFoldingTree::existsOpeningAtLineAfter(unsigned int line, KateCodeFoldingNode *node) +{ + for(KateCodeFoldingNode *tmp = node->parentNode; tmp; tmp=tmp->parentNode) + { + KateCodeFoldingNode *tmp2; + unsigned int startLine=getStartLine(tmp); + + if ((tmp2 = tmp->child(tmp->findChild(node) + 1)) + && ((tmp2->startLineRel + startLine) == line)) + return true; + + if ((startLine + tmp->endLineRel) > line) + return false; + } + + return false; +} + + +// +// get the real line number for a virtual line +// +unsigned int KateCodeFoldingTree::getRealLine(unsigned int virtualLine) +{ + // he, if nothing is hidden, why look at it ;) + if (hiddenLines.isEmpty()) + return virtualLine; + + // kdDebug(13000)<::ConstIterator it=hiddenLines.begin();it!=hiddenLines.end();++it) + { + if ((*it).start<=virtualLine) + virtualLine += (*it).length; + else + break; + } + + // kdDebug(13000)< %1").arg(realLine)<::ConstIterator it=hiddenLines.fromLast(); it!=hiddenLines.end(); --it) + { + if ((*it).start <= realLine) + realLine -= (*it).length; + // else + // break; + } + + // kdDebug(13000)<virtual Line %1").arg(realLine)<